Install g++-8 compiler

The new C++17 language requires g++ >= 8.0. To install it in Ubuntu 18.04:

$ sudo apt install g++-8
...
$ which g++
/usr/bin/g++
$ which g++-8
/usr/bin/g++-8
$ sudo unlink g++
$ sudo link -s /usr/bin/g++-8 /usr/bin/g++
$ g++ --version
g++ (Ubuntu 8.2.0-1ubuntu2~18.04) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Leave a Reply

Your email address will not be published. Required fields are marked *