3

Hey guys i am new to this just started studying computer science and programming and this is the first time im using linux. So how to get the latest version of gcc on ubuntu or does it make a difference (im using 5.4 right now).

1
  • 1
    It depends on what features of gcc you need else simply doing sudo update && sudo apt dist-upgrade will give you the latest version supported by Ubuntu 16.04. Ofcousre you can compile the latest if you need it. Dec 29 '16 at 16:48
5

The latest version is obtained simply by running:

sudo apt update && sudo apt dist-upgrade

then installing with

sudo apt install build-essential

This will install gcc and other programs you will need. Then of course if you want the latest you can compile it yourself. But using the above installation commands you will be able to get the latest for Ubuntu 16.04 lts

1
2

Enable this ppa

https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test

Read here for info

https://wiki.ubuntu.com/ToolChain

1

The best way would be to just use the one in the repos. Simply open a terminal window and type 'apt-get install gcc' and after entering your root password, you will have the gnu compiler collection!

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