Install the video card driver recommended GCC 6.3 version, in fact, many versions of GCC on Linux can coexist, need to switch on the right time, to participate in the previous blog https://www.cnblogs.com/jins-note/p/9513583.html
Install a new version
sudo apt-get updatesudoinstallgcc-6 g++-6sudo Installgcc-7 g++-7
The following code needs to be executed, the switch version needs to be manually set
sudoUpdate-alternatives--Install/usr/bin/GCC GCC/usr/bin/GCC-5 ---slave/usr/bin/g++ g++/usr/bin/g++-5sudoUpdate-alternatives--Install/usr/bin/GCC GCC/usr/bin/GCC-4.8 +--slave/usr/bin/g++ g++/usr/bin/g++-4.8sudoUpdate-alternatives--Install/usr/bin/GCC GCC/usr/bin/GCC-6 ---slave/usr/bin/g++ g++/usr/bin/g++-6sudoUpdate-alternatives--Install/usr/bin/GCC GCC/usr/bin/GCC-7 Ten--slave/usr/bin/g++ g++/usr/bin/g++-7
Switch versions
sudo GCC
From for notes (Wiz)
How to install gcc-6.3 on Ubuntu