The environment

  • Linux/Ubuntu20.04 LTS
  • GCC Version 9.3.0 (Ubuntu 9.3.0-17Ubuntu 1~20.04)

process

  1. Open the terminal to see if a C compiler exists on the native
lauiji@lauiji-IdeaPad-15sIML-2020:~$ gcc -v

Command 'gcc' not found, but can be installed with:

sudo apt install gcc
  1. The prompt is not installed. Follow the prompt to install
lauiji@lauiji-IdeaPad-15sIML-2020:~$ sudo apt install gcc
  1. After the installation is complete, view the installed version
lauiji@lauiji-IdeaPad-15sIML-2020:~$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:hsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Thread model: POSIX GCC version 9.3.0 (Ubuntu 9.3.0-17Ubuntu 1~20.04)

The installation is complete!

In the rainy season, eat the rainbow