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?
-
No need for expectation: packages.ubuntu.com/…– steeldriverFeb 22, 2018 at 15:04
-
1Don't ask AskUbuntu - we're not responsible for release contents. Ask Canonical, who releases Ubuntu– waltinatorFeb 22, 2018 at 15:04
-
See lists.ubuntu.com/archives/ubuntu-devel/2017-July/039924.html @waltinator naah. We probably depend on Debian for this.– RinzwindFeb 22, 2018 at 15:06
-
and also see qa.ubuntuwire.org/ftbfs/rebuilds/…– RinzwindFeb 22, 2018 at 15:08
-
1karel's answer only touches on 17.10/18.04. There are no planned updates for 16.04 to a newer GCC because to do so runs the risk of breaking everything else that's been compiled against the GCC versions in the repository already for Xenial. (To put this in a nutshell anyways)– Thomas Ward ♦Feb 22, 2018 at 15:32
1 Answer
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.
-
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
– karelMay 2, 2018 at 21:40