我尝试在Ubuntu14.04上安装gcc4.9并运行:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update有以下错误:
...
W: Failed to fetch http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/dists/trusty/main/binary-amd64/Packages Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead我在浏览器中输入http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/dists/trusty/main/binary-amd64/Packages获取“未找到”回复。
试着再安装:
sudo apt-get install gcc-4.9包括以下内容:
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:
gcc-4.9:i386 : Depends: cpp-4.9:i386 (= 4.9.4-2ubuntu1~14.04.1) but it is not going to be installed
Depends: gcc-4.9-base:i386 (= 4.9.4-2ubuntu1~14.04.1) but it is not going to be installed
Depends: binutils:i386 (>= 2.24) but it is not going to be installed
Depends: libgcc-4.9-dev:i386 (= 4.9.4-2ubuntu1~14.04.1) but it is not going to be installed
Depends: libc6:i386 (>= 2.11) but it is not going to be installed
Depends: libcloog-isl4:i386 (>= 0.17) but it is not going to be installed
Depends: libgmp10:i386 but it is not installable
Depends: libisl15:i386 (>= 0.15) but it is not going to be installed
Depends: libmpc3:i386 but it is not installable
Depends: libmpfr4:i386 (>= 3.1.3) but it is not going to be installed
Depends: zlib1g:i386 (>= 1:1.1.4) but it is not installable
Recommends: libc6-dev:i386 (>= 2.13-0ubuntu6) but it is not going to be installed下载软件包列表时由于“散列和不匹配”错误而出现问题 --这对我不管用。
任何建议对我都是很好的:)
发布于 2016-10-16 20:00:53
如果你像这样把url剪裁回文件夹
http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/dists/trusty/main/binary-amd64/
然后它在浏览器中工作,您可以看到包文件有一个gzip和bzip2压缩副本。您可以下载该文件并将其放入/var/cache/apt/ file /list或/var/cache/apt/file/它可能跳过失败的步骤。
更新:查看ppa的页面,我可以看到还有另一个链接会更好地工作,试试这个
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppahttps://askubuntu.com/questions/837851
复制相似问题