在 Ubuntu 9.04 上使用 apt-get 安装时出现“无法验证软件包”

在 Ubuntu 9.04 上使用 apt-get 安装时出现“无法验证软件包”

我正在尝试在 Ubuntu 9.04 Jaunty 上下载gccapt-get install但是当 apt-get 尝试下载文件时我收到错误:

WARNING: The following packages cannot be authenticated!   
libc6 libc6-i686 binutils libgomp1 gcc-4.3 gcc linux-libc-dev libc6-dev Install these packages without verification [y/N]? y 

Err http://mt.archive.ubuntu.com jaunty-updates/main libc6 2.9-4ubuntu6.3  404 Not Found [IP: 91.189.88.30 80] 
Err http://mt.archive.ubuntu.com jaunty/main binutils 2.19.1-0ubuntu3   404 Not Found [IP: 91.189.88.30 80] 
Err http://mt.archive.ubuntu.com jaunty/main libgomp1 4.3.3-5ubuntu4   404 Not Found [IP: 91.189.88.30 80] 
Err http://mt.archive.ubuntu.com jaunty/main gcc-4.3 4.3.3-5ubuntu4   404 Not Found [IP: 91.189.88.30 80] 
Err http://mt.archive.ubuntu.com jaunty/main gcc 4:4.3.3-1ubuntu1   404 Not Found [IP: 91.189.88.30 80] 
Err http://security.ubuntu.com jaunty-security/main libc6 2.9-4ubuntu6.3   404 Not Found [IP: 91.189.92.166 80] 
Err http://security.ubuntu.com jaunty-security/main libc6-i686 2.9-4ubuntu6.3   404 Not Found [IP: 91.189.92.166 80] 
Err http://security.ubuntu.com jaunty-security/main linux-libc-dev 2.6.28-19.66   404 Not Found [IP: 91.189.92.166 80] 
Err http://security.ubuntu.com jaunty-security/main libc6-dev 2.9-4ubuntu6.3   404 Not Found [IP: 91.189.92.166 80] 

Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.9-4ubuntu6.3_i386.deb 404 Not Found [IP: 91.189.92.166 80] 
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-i686_2.9-4ubuntu6.3_i386.deb 404 Not Found [IP: 91.189.92.166 80] 
Failed to fetch http://mt.archive.ubuntu.com/ubuntu/pool/main/b/binutils/binutils_2.19.1-0ubuntu3_i386.deb 404 Not Found [IP: 91.189.88.30 80] 
Failed to fetch http://mt.archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.3/libgomp1_4.3.3-5ubuntu4_i386.deb 404 Not Found [IP: 91.189.88.30 80] 
Failed to fetch http://mt.archive.ubuntu.com/ubuntu/pool/main/g/gcc-4.3/gcc-4.3_4.3.3-5ubuntu4_i386.deb 404 Not Found [IP: 91.189.88.30 80] 
Failed to fetch http://mt.archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/gcc_4.3.3-1ubuntu1_i386.deb 404 Not Found [IP: 91.189.88.30 80] 
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_2.6.28-19.66_i386.deb 404 Not Found [IP: 91.189.92.166 80] 
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/glibc/libc6-dev_2.9-4ubuntu6.3_i386.deb 404 Not Found [IP: 91.189.92.166 80] 

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

apt-get update并且--fix-missing没有解决问题。

我该如何解决?

答案1

我设法通过编辑 /etc/apt/sources.list 文件并替换所有实例来解决问题存档.ubuntu.comsecurity.ubuntu.com旧版本之后,我运行 sudo apt-get update 来更新索引。

答案2

这个小脚本在 sources.list 中执行正确的字符串替换并更新包列表:

cd /etc/apt
sudo cp sources.list sources.list.bak
sudo sed -i "s/archive./old-releases./g" sources.list
sudo sed -i "s/\/security./\/old-releases./g" sources.list
sudo apt-get update

答案3

看这里:http://mt.archive.ubuntu.com/ubuntu/dists/– Jaunty 失踪了。

您的 Ubuntu 版本太旧了。Jaunty 存储库不再可用。我认为您需要升级到较新版本的 Ubuntu。

答案4

今天发生在我身上,在 Debian Jessie 上,尝试过:

  • apt-get update:没有帮助
  • apt-get clean:没有帮助
  • apt-key update:没有帮助
  • rm -fr /var/cache/apt/*:没有帮助
  • rm -fr /var/lib/apt/lists/*:问题解决了(别忘了apt-get update)。

apt-get update将很乐意重新创建partial/目录和lock文件,不用担心。

相关内容