Dependency issues while installing gcc 7.3 from Jonathon F's PPA
It seems that gcc-7 (7.3) is broken in Jonathon F's GCC 7.3 PPA. I can't install GCC 7.3 on clean Xenial system (without any other PPA):
$ sudo add-apt-repository -y ppa:jonathonf/gcc-7.3
$ sudo apt-get update
$ 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: libcc1-0 (>= 7.3.0-5ubuntu1~16.04.york0) but 5.4.0-6ubuntu1~16.04.9 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.
$ grep -r ppa /etc/apt/sources.list*
/etc/apt/sources.list.d/jonathonf-ubuntu-gcc-7_3-xenial.list:deb http://ppa.launchpad.net/jonathonf/gcc-7.3/ubuntu xenial main
/etc/apt/sources.list.d/jonathonf-ubuntu-gcc-7_3-xenial.list:# deb-src http://ppa.launchpad.net/jonathonf/gcc-7.3/ubuntu xenial main
So you should purge this PPA and use gcc 7.2 from “PPA for Ubuntu Toolchain Uploads (restricted)” team:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:jonathonf/gcc-7.3
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-7
sudo apt-get install -f
Then contact Jonathon F and inform him about the problem.
Update. But I found other PPA ppa:jonathonf/gcc
from Jonathon F. I can install gcc 7.3 from it.
#sudo ppa-purge ppa:ubuntu-toolchain-r/test # remove starting # if PPA added before
#sudo ppa-purge ppa:jonathonf/gcc-7.3 # remove starting # if PPA added before
sudo add-apt-repository -y ppa:jonathonf/gcc
sudo apt-get update
sudo apt-get install gcc-7 # will install 7.3.0-5ubuntu1~16.04.york0
and even gcc-8
(version 8-20180218-1ubuntu1~16.04.york0).
WillZ
Updated on September 18, 2022Comments
-
WillZ over 1 year
I'm trying to install the latest gcc-7 package from Jonathon F's PPA. Looks like finally now there is a successful build for amd64 as of 2018-02-23.
I met with the following dependency issues when running
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.
Previously, I did install
gcc-7
from Ubuntu's ppa but that was for7.2
. I have removed that package.Running Synaptic, here's a list of suspicious packages:
Any suggestions on how I can resolve these dependency issues and install gcc 7.3?
-
Admin about 6 yearsWith all respect to JonathonF why you ask here? And of course you can remove PPA with
sudo ppa-purge ppa:jonathonf/gcc-7.3
. -
Admin about 6 yearsPossible duplicate of How do I resolve unmet dependencies after adding a PPA?
-
Admin about 6 yearsmy understanding is that Ubuntu ppa only has gcc 7.2. JonathanF's gcc 7.3 is the only way to go? Thanks for the link, let me check it out. I thought someone might have had the same specific issue with regards to this package.
-
-
WillZ about 6 yearsOh, you mean the gcc-7 (7.3) from Jonathan F is actually broken even though the build status shows success?
-
WillZ about 6 yearsI'm referring to the status shown here: launchpad.net/~jonathonf/+archive/ubuntu/gcc-7.3/+build/…
-
N0rbert about 6 yearsIt does not install on my clean Xenial system. It may be successfully built, but does not install (see above).
-
WillZ about 6 yearsThanks for confirming. At least I know it's not just me....
-
N0rbert about 6 yearsSee update above. We can install gcc 7.3 and even 8 from other PPA (
ppa:jonathonf/gcc
). Great work, @JonathonF ! -
N0rbert over 5 years@Ryan please remove your comment from here and open new question with your personal experience and complete details.
-
Adithya almost 4 yearscan i install gcc-6 on xenial using this same method for gcc-7
-
N0rbert almost 4 years@user123 You have to check this by yourself, many things may change after 2 years.
-
Adithya almost 4 yearsya i checked, its not working
-
Aaron Franke almost 3 years
cpp-7 : Depends: gcc-7-base (= 7.3.0-23ubuntu2~16.04.york0) but 7.5.0-3ubuntu1~16.04 is to be installed
-
N0rbert almost 3 yearsThanks for comments, but 16.04 is EOL.