First, Ubuntu under the installation of Gcc/g++/gfortran
1. Installation
(1). gcc
The GCC compiler comes with Ubuntu. You can use the "gcc-v" command to see if it is installed.
(2). g++
Install the g++ compiler, which can be implemented by the command "sudo apt-get installbuild-essential".
After execution, the installation of Gcc,g++,make is completed. Build-essential is a complete set of tools, GCC,LIBC and so on.
With "g++-V" You can see if the g++ is installed successfully.
Note: "sudo apt-get installbuild-essential--fix-missing", this command is patched to install build-essential, which has been installed partially build-essential, but not installed completely, You can use this command to continue installing build-essential.
(3). Gfortran
Input command: sudo apt-get install Gfortran
With the command "Gfortran-v", you can see if the Gfortran installation was successful.
2. After installing the software via Apt-getinstall, the installation directory of the software
1. Some software is installed through the Apt-get Install command, but which folder is the source code of these software and the files after the installation?
You can view it in the following two ways:
(1). Enter the command in Terminal: Dpkg-l software name
eg:dpkg-lgcc
dpkg-lgcc-4.4
dpkg-lg++
Dpkg-l g++-4.4
(2). In the new acquisition of the package you have installed, select the point properties (or right-click), click on the Properties dialog box "installed Files" to see.
Two. Installation of Gcc/g++/gfortran under CentOS
1. Installation
Again Ubuntu under the direct Apt-get install gccg++ can be. Following similar logic, the Yum install GCC g++ report cannot find the g++ package under CentOS. Checked, the original name of the package is called gcc-c++. The complete should be yum install gccgcc-c++
(1) GCC
Command: Yum install gcc
(2) G++/gfortran
Command: Yum install gcc-c++
After the command is executed, the G++/gfortran is installed.
Installing GCC, g++, Gfortran compilers under Linux