在过去的几天里,我无法在Debian 5.0 (lenny)上更新我们的 apt-sources 。我收到以下错误。
W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/main/binary-amd64/Packages 404 Not Found [IP: 130.89.148.12 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/contrib/binary-amd64/Packages 404 Not Found [IP: 130.89.148.12 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/non-free/binary-amd64/Packages 404 Not Found [IP: 130.89.148.12 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/main/source/Sources 404 Not Found [IP: 130.89.148.12 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/contrib/source/Sources 404 Not Found [IP: 130.89.148.12 80]
W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/non-free/source/Sources 404 Not Found [IP: 130.89.148.12 80]
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?
编辑:
我目前的来源是:
# Debian Lenny
deb http://ftp.de.debian.org/debian/ …Run Code Online (Sandbox Code Playgroud) 我经常登录我的 Ubuntu 12.04.2 服务器(使用 Postgres 9.2.4 运行实时生产数据)并看到类似于:
4 packages can be updated.
4 updates are security updates.
Run Code Online (Sandbox Code Playgroud)
当然,这种情况每隔几天就会发生一次。我对自动更新不感兴趣(我睡着时可以更改的东西越少越好),但我有兴趣始终保持服务器最新,所以我的问题是:当我看到诸如也就是说,运行是否总是被认为是安全的apt-get upgrade,或者有时它会破坏事物。我知道补丁并不总是完美的(因此在标题中引用了“总是”),但作为一般规则,运行它是否被认为是安全的(尤其是考虑到这是一个数据库服务器,而不是仅通过 Nginx 提供 CSS 文件的东西)?
我公司的产品本质上是一个 Linux 机器 (Ubuntu),它位于其他人的网络中,运行我们的软件。到目前为止,我们在野外只有不到 25 个盒子,并使用 TeamViewer 来管理它们。
我们现在将运送 1000 个这样的盒子,而 TeamViewer 不再是一种选择。我的工作是找出一种访问这些盒子并更新它们上的软件的方法。这个解决方案应该能够穿透防火墙和你有什么。
我考虑过:
1. 自行开发的解决方案(例如 Linux 服务),它建立到云中服务器的SSH 反向隧道,以及云中的另一个服务来跟踪这些并让您连接到它们。
这显然是劳动密集型的,坦率地说,感觉就像重新发明轮子,因为许多其他公司肯定已经遇到过这个问题。即便如此,我不确定我们会在这方面做得很好。
2. puppet、chef 或 OpenVPN 等工具
我试图尽可能多地阅读,但我似乎无法通过营销演讲足够深入地理解显而易见的选择。
除了我们之外,没有其他人需要连接到这些盒子。有没有相关经验的人可以给我一些指点?
我的 Ubuntu 服务器空间不足,所以我执行此命令以节省空间
sudo rm -rf /var/cache/apt/archives
Run Code Online (Sandbox Code Playgroud)
但是,现在尝试使用 apt 执行操作时,出现以下错误:
E: Could not open lock file /var/cache/apt/archives/lock - open (2 No such file or directory)
E: Unable to lock the download directory
Run Code Online (Sandbox Code Playgroud)
还有像
Archive directory /var/cache/apt/archives/partial is missing.
Run Code Online (Sandbox Code Playgroud)
显然我已经删除了一些目录结构。有没有办法做一个apt-get rebuild-var-tree或类似的?
我喜欢使用“knife cloudstack server create ...”来构建一个新的VM。我的引导模板以“apt-get update”和“apt-get -y upgrade”开始。
升级然后停止:
10.190.113.11 Configuration file `/etc/nscd.conf'
10.190.113.11 ==> Modified (by you or by a script) since installation.
10.190.113.11 ==> Package distributor has shipped an updated version.
10.190.113.11 What would you like to do about it ? Your options are:
10.190.113.11 Y or I : install the package maintainer's version
10.190.113.11 N or O : keep your currently-installed version
10.190.113.11 D : show the differences between the versions
10.190.113.11 Z : start a shell …Run Code Online (Sandbox Code Playgroud) 我无法在我的 ubuntu 9.10 服务器机器上安装 mysql-server。使用 apt-get install mysql-server 时,输出为:
# apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 120 not upgraded.
2 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Setting up mysql-server-5.1 (5.1.37-1ubuntu5.4) ...
* Stopping MySQL database server
Mysqld [ OK ]
* Starting MySQL database server
mysqld [fail] …Run Code Online (Sandbox Code Playgroud) 我有一个捕获 22 试图:
# apt-get update
[... good lines omitted]
W: GPG error: http://backports.debian.org lenny-backports Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
W: GPG error: http://http.us.debian.org stable Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
W: GPG error: http://ftp.us.debian.org lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA
Run Code Online (Sandbox Code Playgroud)
在http://wiki.debian.org/SecureApt#Other_problems 上,它指出 NO_PUBKEY 问题“意味着存档已开始由新密钥签名,您的系统不知道该密钥......一旦系统被输入新密钥(通过升级 debian-archive-keyring …
我正在尝试编写一个脚本,该脚本将从 apt 输出可升级包的数量。然而,它也不断给我这个警告:
# sudo apt update | grep packages | cut -d '.' -f 1
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
All packages are up to date
Run Code Online (Sandbox Code Playgroud)
我希望它只输出:
All packages are up to date
Run Code Online (Sandbox Code Playgroud)
或者
35 packages can be updated
Run Code Online (Sandbox Code Playgroud)
有什么办法可以禁用该警告吗?我将在来自 cron 作业的 Discord 通知中使用这个返回的字符串以及一些额外的信息,它非常糟糕地搞乱了我的输出。
我已经看过这些,但没有一个对我有用:
https://unix.stackexchange.com/questions/19470/list-available-updates-but-do-not-install-them
https://askubuntu.com/questions/269606/apt-get-count-the-number-of-updates-available
我正在尝试在我的 Ubuntu 18.04 上安装 WordPress + LEMP。我对安装 Apache 没有兴趣。为什么 PHP 安装程序假定我这样做?
apt ×10
debian ×4
ubuntu ×3
linux ×2
ubuntu-12.04 ×2
ansible ×1
bash ×1
chef ×1
cron ×1
debian-lenny ×1
devops ×1
mysql ×1
nginx ×1
php ×1
public-key ×1
raspbian ×1
ubuntu-18.04 ×1
update ×1