当我在 VPS 上执行“apt-get update”时,我收到很多错误消息:
Err http://ftp.debian.org lenny/volatile/main Packages
404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/volatile/contrib Packages
404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/volatile/non-free Packages
404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/updates/main Packages
404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/updates/contrib Packages
404 Not Found [IP: 130.89.149.226 80]
Err http://ftp.debian.org lenny/updates/non-free Packages
404 Not Found [IP: 130.89.149.226 80]
W: Failed to fetch http://ftp.debian.org/debian-volatile/dists/lenny/volatile/main/binary-i386/Packages 404 Not Found [IP: 130.89.149.226 80]
W: Failed to fetch http://ftp.debian.org/debian-volatile/dists/lenny/volatile/contrib/binary-i386/Packages 404 Not Found [IP: 130.89.149.226 80]
W: Failed to fetch http://ftp.debian.org/debian-volatile/dists/lenny/volatile/non-free/binary-i386/Packages 404 Not Found [IP: 130.89.149.226 80]
W: Failed to fetch http://ftp.debian.org/debian-security/dists/lenny/updates/main/binary-i386/Packages 404 Not Found [IP: 130.89.149.226 80]
W: Failed to fetch http://ftp.debian.org/debian-security/dists/lenny/updates/contrib/binary-i386/Packages 404 Not Found [IP: 130.89.149.226 80]
W: Failed to fetch http://ftp.debian.org/debian-security/dists/lenny/updates/non-free/binary-i386/Packages 404 Not Found [IP: 130.89.149.226 80]
E: Some index files failed to download, they have been ignored, or old ones used instead.
有人能帮助我更新此列表以使所有 URL 都能正常工作吗?
抱歉,问题的标题很奇怪,但我不知道正确的术语。
答案1
您正在寻找的文件是/etc/apt/sources.list
。
您的主机可能正在使用较旧的 OpenVZ 模板之一,该模板具有错误的 repo URL。
试试我的列表:
deb http://security.debian.org/ lenny/updates 主要贡献 非自由 deb http://volatile.debian.org/debian-volatile lenny/volatile 主要贡献 非自由 deb http://ftp.us.debian.org/debian/ lenny main deb-src http://ftp.us.debian.org/debian/ lenny main deb-src http://security.debian.org/lenny/updates main deb-src http://volatile.debian.org/debian-volatile lenny/volatile main
答案2
似乎不http://ftp.devian.org/debian-security
存在。查看时http://ftp.debian.org/
,我看到的只有debian/
也许可以试试security.debian.org
?
答案3
尽管人们可能认为它的名字如此,但ftp.debian.org
它并不比其他 Debian 镜像更完整。例如,它没有debian-volatile
。Debian 网站有一个debian-volatile 镜像列表. 安全更新应直接来自security.debian.org
。
您需要编辑/etc/apt/sources.list
。将 volatile 和 security 行更改为类似
deb http://ftp.nl.debian.org/debian-volatile lenny/volatile main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
在您这样做的同时,您不妨更改核心线路以供使用ftp.nl.debian.org
。