当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : Ubuntu14.04升级gcc-5出错
帖子发表于 : 2016-11-30 11:31 

注册: 2016-02-29 16:13
帖子: 2
系统: ubuntu
送出感谢: 0 次
接收感谢: 0 次
我主要按照博客[url]Ubuntu 14.04 LTS 下升级 gcc 到 gcc-4.9、gcc-5 版本[http://www.cnblogs.com/BlackStorm/p/5183490.html]的步骤升级gcc。
代码:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-get upgrade
sudo apt-get install gcc-5 g++-5

出现如下错误:
代码:
gph@gph-pc:~$ sudo apt-get install gcc-5
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:
 gcc-5:i386 : Depends: cpp-5:i386 (= 5.4.1-2ubuntu1~14.04) but it is not going to be installed
              Depends: libcc1-0:i386 (>= 5.4.1-2ubuntu1~14.04) but it is not going to be installed
              Depends: binutils:i386 (>= 2.24) but it is not going to be installed
              Depends: libgcc-5-dev:i386 (= 5.4.1-2ubuntu1~14.04) but it is not going to be installed
              Depends: libc6:i386 (>= 2.15) but it is not going to be installed
              Depends: libgcc1:i386 (>= 1:3.0) but it is not going to be installed
              Depends: libgmp10:i386 but it is not going to be installed
              Depends: libisl15:i386 (>= 0.15) but it is not going to be installed
              Depends: libmpc3:i386 but it is not going to be installed
              Depends: libmpfr4:i386 (>= 3.1.3) but it is not going to be installed
              Depends: libstdc++6:i386 (>= 4.1.1) but it is not going to be installed
              Depends: zlib1g:i386 (>= 1:1.1.4) but it is not going to be installed
              Recommends: libc6-dev:i386 (>= 2.13-0ubuntu6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

请问各位应该如何解决,期待能够得到大家的帮助!


页首
 用户资料  
 
2 楼 
 文章标题 : Re: Ubuntu14.04升级gcc-5出错
帖子发表于 : 2016-12-02 10:36 
头像

注册: 2014-05-03 22:44
帖子: 15
系统: Ubuntu 16.04/14.04
送出感谢: 1
接收感谢: 0 次
i have the same question when install g++
when apt-get update, it always report failed to get
.../ubuntu/dists/trusty-updates/universe/binary-amd64/packages
Error 404
then i type the url in Firefox, I found packages.gz or packages.bz other than packages...
in the end i could not type Chinese...

cat /etc/issue
Ubuntu 14.04.3 LTS \n \l


页首
 用户资料  
 
3 楼 
 文章标题 : Re: Ubuntu14.04升级gcc-5出错
帖子发表于 : 2016-12-02 14:26 
头像

注册: 2007-03-15 16:58
帖子: 2802
地址: 湖北武汉
送出感谢: 2
接收感谢: 4
代码:
sudo apt-get install -f


_________________
引用:


页首
 用户资料  
 
4 楼 
 文章标题 : Re: Ubuntu14.04升级gcc-5出错
帖子发表于 : 2016-12-02 17:40 
头像

注册: 2014-05-03 22:44
帖子: 15
系统: Ubuntu 16.04/14.04
送出感谢: 1
接收感谢: 0 次
lhw828 写道:
代码:
sudo apt-get install -f


似乎不成功呢……我用14.04 update也不能正确下载所有内容,安装g++也是提示

正在读取状态信息... 完成
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
g++ : 依赖: g++-4.8 (>= 4.8.2-5~) 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系。

执行 sudo apt-get install -f 也是没有效果的……
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 1 个软件包未被升级。


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译