无法在ubuntu 18.04上安装g ++,对我已安装的软件包的依赖项失败

时间:2019-03-01 01:26:42

标签: ubuntu dependencies g++

我已经安装了gcc和gcc-5,但是无法安装g ++。

sudo apt install g++ g++-5 libstdc++-5-dev libc6-dev libc6=2.23-0ubuntu11 libc-dev-bin

将失败,因为

The following packages have unmet dependencies:
 g++ : Depends: gcc (>= 4:5.3.1-1ubuntu1) but it is not going to be installed
       Depends: gcc-5 (>= 5.3.1-3~) but it is not going to be installed
 g++-5 : Depends: gcc-5 (= 5.4.0-6ubuntu1~16.04.11) but it is not going to be installed

但是

sudo apt install gcc gcc-5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version (4:5.3.1-1ubuntu1).
gcc-5 is already the newest version (5.4.0-6ubuntu1~16.04.11).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

0 个答案:

没有答案