首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Ubuntu14.04LTS上安装带有“散列和不匹配”错误的gcc4.9

在Ubuntu14.04LTS上安装带有“散列和不匹配”错误的gcc4.9
EN

Ask Ubuntu用户
提问于 2016-10-16 13:48:59
回答 1查看 502关注 0票数 0

我尝试在Ubuntu14.04上安装gcc4.9并运行:

代码语言:javascript
复制
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update

有以下错误:

代码语言:javascript
复制
...
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获取“未找到”回复。

试着再安装:

代码语言:javascript
复制
sudo apt-get install gcc-4.9

包括以下内容:

代码语言:javascript
复制
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

下载软件包列表时由于“散列和不匹配”错误而出现问题 --这对我不管用。

任何建议对我都是很好的:)

EN

回答 1

Ask Ubuntu用户

发布于 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的页面,我可以看到还有另一个链接会更好地工作,试试这个

代码语言:javascript
复制
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/837851

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档