0 premise
ubuntu has been replaced by a domestic source
1 Directly enter gcc --version in the terminal to check whether the computer has installed gcc
gcc --version
2 Execute the computer prompt information, enter in the terminal
sudo apt install gcc
3 Check whether the installation is successful, and the terminal executes the following command
gcc --version