全新安装 Ubuntu 16.04 后,我发现软件包损坏,无法安装大多数应用程序。我尝试使用 Synaptic 的“修复损坏的软件包”,但不起作用。例如:
sudo apt-get install steam
输出;
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
steam:i386 : Depends: libc6:i386 (>= 2.15) but it is not going to be installed
Depends: libstdc++6:i386 (>= 4.3) but it is not going to be installed
Depends: libx11-6:i386 but it is not going to be installed
Depends: libudev1:i386 but it is not going to be installed
Depends: libxinerama1:i386 but it is not going to be installed
Depends: libtxc-dxtn0:i386
Depends: libgl1-mesa-dri:i386 but it is not going to be installed
Depends: libgl1-mesa-glx:i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
另一个例子;
sudo apt-get install nvidia-361
输出;
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nvidia-361 : Depends: lib32gcc1 but it is not going to be installed
Depends: libc6-i386 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
没有输出;
sudo apt-get clean
我试过;
sudo apt-get install -f
输出;
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
谢谢..
答案1
16.04 是新版本,并非所有服务器都已准备好使用所有软件包。使用主服务器下载软件包解决了我的问题。
- 系统设置
- 软件与更新
- 从“下载自”部分中选择“主服务器”
答案2
在为 arm 启用外部架构后,我遇到了同样的问题:
dpkg --print-foreign-architectures
i386
armvfp
armhf
这阻止了apt update
完全完成,它总是以以下方式结束:
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://apt.llvm.org/xenial llvm-toolchain-xenial-3.9 InRelease' doesn't support architecture 'armhf'
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://apt.llvm.org/xenial llvm-toolchain-xenial InRelease' doesn't support architecture 'armhf'
N: Skipping acquire of configured file 'non-free/binary-armhf/Packages' as repository 'http://repository.spotify.com stable InRelease' doesn't support architecture 'armhf'
W: http://ppa.launchpad.net/colingille/freshlight/ubuntu/dists/vivid/Release.gpg: Signature by key 3764AB961B292804CD3474FAEAE2E8E7CB7F5C71 uses weak digest algorithm (SHA1)
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.26 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-proposed/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
虽然错误只针对 arm,但它阻止安装许多软件包。删除这些架构并sudo dpkg --remove-architecture armvfp
随后sudo dpkg --remove-architecture armhf
使用apt update
解决了问题。
我知道 OP 的问题已经得到解答了,但是我的情况也出现了同样的症状。