在配置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