I recently migrated from Windows to Ubuntu (actually Codeanywhere running Ubuntu) and need to upgrade to gcc 7, as it comes with gcc 4.8.2, and I need C ++ 17. I executed the following commands on the terminal:

 $ sudo apt-get install software-properties-common python-software-properties
 $ sudo add-apt-repository ppa:jonathonf/gcc-7.1
 $ sudo apt-get update
 $ sudo apt-get install gcc-7 g++-7

But I received the following error:

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++-7 : Depends: libisl15 (>= 0.15) but it is not installable
        Depends: libmpfr4 (>= 3.1.3) but 3.1.2-1 is to be installed
gcc-7 : Depends: cpp-7 (= 7.1 .8-10ubuntu1~14.04.york8) but it is not going to be installed
        Depends: binutils (>= 2.26.1) but 2.24-5ubuntu14.2 is to be installed
        Depends: libisl15 (>= 0.15) but it is not installable
        Depends: libmpfr4 (>= 3.1.3) but 3.1.2-1 is to be installed

E: Unable to correct problems, you haye held broken packages.

Ubuntu version:

 $ cat /etc/lsb*

What I need to do?
Sorry for my English.

Missing package islibisl15 (>= 0.15), and not libisllS (>= 8.15). Sorry.

  • 2
    Which version of Ubuntu are you running? – L. D. James Aug 5 '17 at 16:17
  • Please clarify with your ubuntu version. Run the following command and please post the output, thanks! cat /etc/lsb* – mchid Aug 5 '17 at 17:05
  • @mchid post updated – Felipe Nascimento Aug 5 '17 at 17:55
  • See also askubuntu.com/q/859256/262426 for 16.04, which is probably where the OP got these steps from. – Xiong Chiamiov Aug 5 '17 at 18:34

That PPA only has packages published for Ubuntu 16.04, but you're trying to use them on Ubuntu 14.04. That's why you're running into problems.

Do you have a compelling reason to use 14.04? 16.04 is the latest release that's supported for a long time (LTS), and 17.04 is the latest release (that's why these two are the ones listed on the download page).

  • I not installed the Ubutu. My PC is running Windows, but, I use the Codenaywhere to programme, and it use Ubuntu 14.04 or CentOS 6.5 – Felipe Nascimento Aug 5 '17 at 18:38
  • Your realistic options are then: a) don't use C++17 features, b) pester Codeanywhere to update their software to non-ancient versions, or c) don't use Codeanywhere. It's possible to compile a much newer version of gcc yourself, but it would be a giant pain in the ass for someone experienced with Linux, and effectively impossible for you. – Xiong Chiamiov Aug 5 '17 at 18:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.