![安装 Debian 后无法更新](https://linux22.com/image/1486627/%E5%AE%89%E8%A3%85%20Debian%20%E5%90%8E%E6%97%A0%E6%B3%95%E6%9B%B4%E6%96%B0.png)
我尝试编辑 sources.list 文件来更新 repo,但没有成功。这是我目前的列表:
#
# deb cdrom:[Debian GNU/Linux 8.3.0 _Jessie_ - Official amd64 lxde-CD Binary-1 $
deb cdrom:[Debian GNU/Linux 8.3.0 _Jessie_ - Official amd64 lxde-CD Binary-1 20$
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main
deb http://archive.debian.org/debian stretch main contrib
deb http://ftp.debian.org/debian/ stretch-updates main contrib
deb http://security.debian.org/ stretch/updates main contrib
# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://ftp.debian.org/debian/ jessie-updates main
# deb-src http://ftp.debian.org/debian/ jessie-updates main
运行时,错误输出为:
Hit http://ftp.debian.org stretch-updates/main Translation-en
Err http://archive.debian.org stretch/main amd64 Packages
404 Not Found [IP: 206.12.19.126 80]
Err http://archive.debian.org stretch/contrib amd64 Packages
404 Not Found [IP: 206.12.19.126 80]
Ign http://archive.debian.org stretch/contrib Translation-en_US
Ign http://archive.debian.org stretch/contrib Translation-en
Ign http://archive.debian.org stretch/main Translation-en_US
Ign http://archive.debian.org stretch/main Translation-en
W: Failed to fetch http://archive.debian.org/debian/dists/stretch/main/binary-amd64/Packages 404 Not Found [IP: 206.12.19.126 80]
W: Failed to fetch http://archive.debian.org/debian/dists/stretch/contrib/binary-amd64/Packages 404 Not Found [IP: 206.12.19.126 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
奇怪的是,它搜索 Packages(但没有找到)因为真正的文件是 Packages.gz!
答案1
因为您使用的archive.debian.org
是存档发布的 URL。您需要将其用于ftp.debian.org
实际发布。