标签: apt

Debian 5.0 (lenny) apt 源失败?

在过去的几天里,我无法在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)

debian debian-lenny apt

19
推荐指数
3
解决办法
5万
查看次数

在生产服务器上运行“apt-get upgrade”(就稳定性而言)通常是否安全?

我经常登录我的 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 文件的东西)?

ubuntu update patch-management apt ubuntu-12.04

19
推荐指数
3
解决办法
1万
查看次数

管理防火墙后面的 Linux 计算机集群

我公司的产品本质上是一个 Linux 机器 (Ubuntu),它位于其他人的网络中,运行我们的软件。到目前为止,我们在野外只有不到 25 个盒子,并使用 TeamViewer 来管理它们。

我们现在将运送 1000 个这样的盒子,而 TeamViewer 不再是一种选择。我的工作是找出一种访问这些盒子并更新它们上的软件的方法。这个解决方案应该能够穿透防火墙和你有什么。

我考虑过:

1. 自行开发的解决方案(例如 Linux 服务),它建立到云中服务器的SSH 反向隧道,以及云中的另一个服务来跟踪这些并让您连接到它们。

这显然是劳动密集型的,坦率地说,感觉就像重新发明轮子,因为许多其他公司肯定已经遇到过这个问题。即便如此,我不确定我们会在这方面做得很好。

2. puppet、chef 或 OpenVPN 等工具

我试图尽可能多地阅读,但我似乎无法通过营销演讲足够深入地理解显而易见的选择。

除了我们之外,没有其他人需要连接到这些盒子。有没有相关经验的人可以给我一些指点?

linux linux-networking apt ansible devops

19
推荐指数
3
解决办法
1608
查看次数

Debian/Ubuntu - 如何在删除后恢复 /var/cache/apt 结构?

我的 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或类似的?

package-management ubuntu debian apt

18
推荐指数
1
解决办法
3万
查看次数

如何在 Ubuntu 12 中的 apt-get 升级期间自动更改配置文件

我喜欢使用“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)

chef apt ubuntu-12.04

18
推荐指数
2
解决办法
2万
查看次数

每晚运行 apt-get update 安全吗?

apt-get update -y在生产服务器上运行cron是否安全?

debian cron apt

17
推荐指数
3
解决办法
6271
查看次数

无法在 Ubuntu 中安装 mysql-server

我无法在我的 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)

mysql ubuntu apt

17
推荐指数
2
解决办法
4万
查看次数

Debian。如何安全地获得 debian-archive-keyring,以便我可以进行 apt-get 更新?NO_PUBKEY

我有一个捕获 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 …

debian public-key apt

17
推荐指数
3
解决办法
6万
查看次数

如何禁用“警告:apt 没有稳定的 CLI 界面...”

我正在尝试编写一个脚本,该脚本将从 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://askubuntu.com/questions/49958/how-to-find-the-number-of-packages-needing-update-from-the-command-line

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

linux bash command-line-interface apt raspbian

17
推荐指数
2
解决办法
4万
查看次数

为什么命令 'apt install php' 会尝试安装 Apache?

我正在尝试在我的 Ubuntu 18.04 上安装 WordPress + LEMP。我对安装 Apache 没有兴趣。为什么 PHP 安装程序假定我这样做?

php nginx apt ubuntu-18.04

16
推荐指数
2
解决办法
2279
查看次数