您的位置:首页 > 编程语言 > C语言/C++

Ubuntu Server 14.04.3 LTS 安装C/C++开发环境时遇到的依赖关系问题

2015-12-19 19:10 951 查看
在配置GCC的过程中,通常我们会去安装build-seesential这个软件包,以前安装desktop版本时一直都很顺利,但是在安装server版本时却遇到很头疼的问题,重装了几次也没能解决,也尝试了很多方法问题依旧。报错如下:

$ sudo apt-get install build-essential
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:
build-essential : Depends: gcc (>= 4:4.4.3) but it is not going to be installed
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


最后尝试更换了源解决了问题,将默认的源列表替换为了中科大的

deb http://debian.ustc.edu.cn/ubuntu/ vivid main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-backports main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-proposed main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-security main multiverse restricted universe
deb http://debian.ustc.edu.cn/ubuntu/ vivid-updates main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-backports main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-proposed main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-security main multiverse restricted universe
deb-src http://debian.ustc.edu.cn/ubuntu/ vivid-updates main multiverse restricted universe


附链接:http://wiki.ubuntu.org.cn/Qref/Source
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: