我無法在新安裝的Ubuntu 14.04.4 LTS上安裝g ++。無法在ubuntu 14.04.4 LTS上安裝g ++
當我使用命令sudo apt-get install g++
,終端告訴我:
[email protected]:~$ sudo apt-get install g++
[sudo] password for cluster:
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:
g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我改變了來源,並再次嘗試,失敗了。
[email protected]:~$ sudo apt-get install g++
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:
g++:i386 : Depends: cpp:i386 (>= 4:4.7.3-1ubuntu10) but it is not going to be installed
Depends: gcc:i386 (>= 4:4.7.3-1ubuntu10) but it is not going to be installed
Depends: g++-4.7:i386 (>= 4.7.3-1~) but it is not going to be installed
Depends: gcc-4.7:i386 (>= 4.7.3-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我使用的Ubuntu軟件中心安裝G ++,又失敗了...... Figure: Use ubuntu software center to install g++
這個問題已經通過改變其它來源解決。
我已經嘗試了4個來源,並且他們都有問題...... OMG!
查看https://askubuntu.com/questions/118749/package-system-is-broken-how-to-fix-it – sashoalm