2

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*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"

What I need to do?
Sorry for my English.

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

4
  • 2
    Which version of Ubuntu are you running? Aug 5, 2017 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, 2017 at 17:05
  • @mchid post updated Aug 5, 2017 at 17:55
  • See also askubuntu.com/q/859256/262426 for 16.04, which is probably where the OP got these steps from. Aug 5, 2017 at 18:34

1 Answer 1

0

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).

2
  • 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 Aug 5, 2017 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. Aug 5, 2017 at 18:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .