安装GCC
https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/
#Perform the steps below to install the GCC Compiler Ubuntu 18.04:
#Start by updating the packages list:
sudo apt update
#Install the build-essential package by typing:
sudo apt install build-essential
#The command will install a bunch of new packages including gcc, g++ and make.
#You may also want to install the manual pages about using GNU/Linux for development:
sudo apt-get install manpages-dev
#To validate that the GCC compiler is successfully installed use the gcc --version command #which will print the GCC version:
gcc --version #查看当前gcc版本
# 使用如下命令选择gcc的版本, 50是指这个版本的优先级,值越大,优先级越高
sudo update-alternatives --config gcc
gcc -V #语句验证是否更改成功
build
…