我有一个匿名根服务器,主要运行 Web 服务(带有 php5 的 Apache)、邮件和 VPN。是时候将其更新为稳定且受支持的系统版本了。
我遵循了Debian 升级文档,但遇到了一些小(?)问题,例如当我的系统仍然使用“eth0”时,没有/etc/udev/rules.d/70-persistent-net.rules
文件,所以我什至不知道如何继续。
暂时忽略这一点,我无法开始apt update
工作。经过一番阅读后,我想出了这个/etc/apt/sources.list
:
deb [trusted=yes] http://archive.debian.org/debian stretch main contrib non-free
deb [trusted=yes] http://security.debian.org/debian-security stretch/updates contrib main non-free
还有一个文件/etc/apt/sources.list.d/backports.list
,我将其更改为:
deb [trusted=yes] http://archive.debian.org/debian stretch-backports main
apt update
然后列出了几十Ign: …
行和这些:
Err:3 http://security.debian.org/debian-security stretch/updates/contrib amd64 Packages
404 Not Found [IP: 199.232.190.132 80]
结尾为:
Reading package lists... Done
E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/contrib/binary-amd64/Packages 404 Not Found [IP: 199.232.190.132 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
更新
修复“debian-security”源链接后,我尝试使用以下列表更新到buster:
deb http://ftp.de.debian.org/debian buster main contrib non-free
deb http://ftp.de.debian.org/debian buster-updates main contrib non-free
#deb http://ftp.de.debian.org/debian buster-backports main contrib non-free
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free
(向后移植链接导致另一个“无发布文件”错误,因此我将其省略。)
这导致:
# apt update
Hit:1 http://security.debian.org/debian-security buster/updates InRelease
Hit:2 http://ftp.de.debian.org/debian buster InRelease
Hit:3 http://ftp.de.debian.org/debian buster-updates InRelease
The AppStream system cache was updated, but some errors were detected, which might lead to missing metadata. Refer to the verbose log for more information.
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi'
E: Sub-process returned an error code