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

来源:互联网 发布:apache 双向认证 编辑:程序博客网 时间:2024/06/05 22:57

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

$ sudo apt-get install build-essential                         Reading package lists... DoneBuilding dependency treeReading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor 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 installedE: Unable to correct problems, you have held broken packages.

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

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

附链接:http://wiki.ubuntu.org.cn/Qref/Source

0 0