安装g ++-7:未满足的依赖项

时间:2020-10-11 16:42:27

标签: linux ubuntu

我想将gcc-7与g ++-7一起安装。首先,我已经成功安装了gcc7。当然可以了

sudo apt update

然后我无法安装g ++ 7:

anton@AntonLinux:/$ sudo apt install g++-7
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:
 libc6-dev : Breaks: libgcc-7-dev (< 7.5.0-6~) but 7.5.0-3ubuntu1~18.04 is to be installed
E: Unable to correct problems, you have held broken packages.

我也尝试删除libgcc-7-dev,但没有帮助。当前已安装以下相关软件包:

anton@AntonLinux:/$ apt list --installed | grep libgcc

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libgcc-10-dev/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-4.8-dev/bionic,now 4.8.5-4ubuntu8 amd64 [installed,automatic]
libgcc-6-dev/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 i386 [installed,automatic]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 amd64 [installed,upgradable to: 1:10.1.0-1]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 i386 [installed,upgradable to: 1:10.1.0-1]


anton@AntonLinux:/$ apt list --installed | grep libc6

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libc6-dbg/unstable,now 2.31-4 amd64 [installed,automatic]
libc6/unstable,now 2.31-4 amd64 [installed,automatic]
libc6/unstable,now 2.31-4 i386 [installed,automatic]


anton@AntonLinux:/$ apt list --installed | grep gcc

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

gcc-10-base/unstable,now 10.2.0-13 amd64 [installed,automatic]
gcc-10-base/unstable,now 10.2.0-13 i386 [installed,automatic]
gcc-10/unstable,now 10.2.0-13 amd64 [installed,automatic]
gcc-4.8-base/bionic,now 4.8.5-4ubuntu8 amd64 [installed,automatic]
gcc-4.8/bionic,now 4.8.5-4ubuntu8 amd64 [installed]
gcc-6-base/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
gcc-6/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
gcc-7-base/bionic-updates,bionic-security,now 7.5.0-3ubuntu1~18.04 amd64 [installed,automatic]
gcc-8-base/bionic-updates,bionic-security,now 8.4.0-1ubuntu1~18.04 amd64 [installed,upgradable to: 8.4.0-4]
gcc-8-base/bionic-updates,bionic-security,now 8.4.0-1ubuntu1~18.04 i386 [installed,upgradable to: 8.4.0-4]
gcc/unstable,now 4:10.2.0-1 amd64 [installed,automatic]
libgcc-10-dev/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-4.8-dev/bionic,now 4.8.5-4ubuntu8 amd64 [installed,automatic]
libgcc-6-dev/bionic-updates,now 6.5.0-2ubuntu1~18.04 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 amd64 [installed,automatic]
libgcc-s1/unstable,now 10.2.0-13 i386 [installed,automatic]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 amd64 [installed,upgradable to: 1:10.1.0-1]
libgcc1/bionic-updates,bionic-security,now 1:8.4.0-1ubuntu1~18.04 i386 [installed,upgradable to: 1:10.1.0-1]

0 个答案:

没有答案