我正在尝试从乔纳森·F的PPA安装最新的gcc-7软件包.看来现在终于有了一个成功的构建amd64 2018-02-23。
在运行sudo apt-get install gcc-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.
gcc-7 : Depends: cpp-7 (= 7.3.0-5ubuntu1~16.04.york0) but it is not going to be installed
Depends: gcc-7-base (= 7.3.0-5ubuntu1~16.04.york0) but 7.2.0-1ubuntu1~16.04 is to be installed
Depends: libcc1-0 (>= 7.3.0-5ubuntu1~16.04.york0) but 7.2.0-1ubuntu1~16.04 is to be installed
Depends: binutils (>= 2.28) but 2.26.1-1ubuntu1~16.04.6 is to be installed
Depends: libgcc-7-dev (= 7.3.0-5ubuntu1~16.04.york0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.以前,我确实从Ubuntu的ppa安装了gcc-7,但这是针对7.2的。我把那个包裹拿走了。
运行Synaptic,以下是可疑包的列表:

对于如何解决这些依赖问题并安装gcc 7.3,有什么建议吗?
发布于 2019-05-13 09:28:03
当使用命令从jonathonf添加ppa时
sudo add-apt-repository ppa:jonathonf/gcc-7.3消息显示在日志中。
这是针对ppa:jonathonf/gcc 构建的,并且需要更多信息:https://launchpad.net/~jonathonf/+archive/ubuntu/gcc-7.3
添加ppa解决了依赖关系问题。
sudo add-apt-repository ppa:jonathonf/gcc
sudo apt-get update
sudo apt-get install gcc-7 严重的问题是
以下软件包有未满足的依赖关系: libcc1-0 :libcc1-0 (>= 7.3.0-23ubuntu2~16.04.york 0),但5.4.0-6 ubuntu1~16.04.11取决于: libgcc-7-dev (= 7.3.0-23ubuntu2~16.04.york 0),但它不会被安装E:无法纠正问题,您持有坏包。
https://askubuntu.com/questions/1009433
复制相似问题