0

The current version of supported GCC on Ubuntu 16.04.3 LTS is 5.4 version and the latest GCC version is already at 7.0. So can we expect a newer version of GCC in Ubuntu 18.04 LTS?

7

1 Answer 1

5

You can already install gcc 7.0 in Ubuntu 17.10 from the default repositories. The latest version of GNU C compiler in the Ubuntu 17.10 and 18.04 default repositories is gcc-7. To install gcc-7 in Ubuntu 17.10, 18.04 and 18.10 open the terminal and type:

sudo apt install gcc-7 

To install gcc-8 in Ubuntu 18.04 and later open the terminal and type:

sudo apt install gcc-8

To install gcc-9 in Ubuntu 19.04 and later open the terminal and type:

sudo apt install gcc-9

You can install gcc-7 in Ubuntu 16.04 from ppa:jonathonf/gcc-7.1.

sudo add-apt-repository ppa:jonathonf/gcc-7.1  
sudo apt update  
sudo apt install gcc-7  

You can install gcc-8 in Ubuntu 16.04 from ppa:jonathonf/gcc-8.0.

sudo add-apt-repository ppa:jonathonf/gcc-8.0  
sudo apt update  
sudo apt install gcc-8 

It makes more sense to either wait until April and install gcc-7 in Ubuntu 18.04 or else install it in Ubuntu 17.10 now.

2
  • GCC 8.1 was released today. No idea when it will appear in a repository. But you can always download and build it. Loading up Ubuntu 18.04 and compiling gcc 8.1 would feel like hanging ten on the hood of Elon Musk's spacefaring Tesla Roadster... May 2, 2018 at 16:50
  • @BlairHoughton gcc-8 has landed in the official Ubuntu repositories for Ubuntu 18.04 and later. To install gcc-8 in Ubuntu 18.04 and later run this command sudo apt install gcc-8
    – karel
    May 2, 2018 at 21:40

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