By default, Ubuntu does not provide a C/C ++ compiling environment. Therefore, you need to install it manually. If it is troublesome to install gcc and g ++ separately, we are fortunate to have provided a build-essential software package to compile the Ubuntu kernel. View the dependencies of the software package. You can see the following: $ apt-cachedependsbuild-essential build-essential | dependency: libc6
By default, Ubuntu does not provide a C/C ++ compiling environment. Therefore, you need to install it manually.
If it is troublesome to install gcc and g ++ separately, we are fortunate to have provided a build-essential software package to compile the Ubuntu kernel.
View the dependency of the software package. You can see the following:
$ Apt-cache depends build-essential
Build-essential
| Dependency: libc6-dev
Dependency:
Libc6-dev
Dependency: gcc
Dependency: g ++
Dependency: make
Dependency: dpkg-dev
That is to say, if this software package is installed, all the software packages required to compile c/c ++ will also be installed. Therefore, to compile the c/c ++ program in Ubuntu, you only need to install the software package.
The installation method is as follows:
$ Sudo apt-get install build-essential