Ubuntu18.04版本安装gcc、g++
sudo apt-get install aptitude
sudo aptitude install gcc g++
输入 gcc --version,输出以下信息,说明已经装好了。
gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 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.