(1) In centos5.5:
1. Install with Yum (simplest ):
1.1 when using yum for installation, first ensure the latest source to upgrade the software in the system through the network software file image, such as directly executing the following on the terminal:
CD/etc/yum. Repos. d
MV CentOS-Base.repo CentOS-Base.repo.save
Wget http://centos.ustc.edu.cn/CentOS-Base.repo.5
MV CentOS-Base.repo.5 CentOS-Base.repo
Update
1.2 use: Yum install GCC and Yum install gcc-C ++ in sequence
Yum can automatically find the dependent packages of the software and automatically download and install the software.
1.3 because the autotools tools are generally used for compilation links, these tools include:
Autoscan
Aclocal
Autoheader
Autoconf
Automake
You can run the which command to check whether the directory is installed and installed.
Use yum for installation:
Yum install Autoconf and Yum install automake
Now, after installing the C ++ development, compilation, and link environment, you can start the C ++ programming journey.
Because this tool is relatively small, you can also choose to use the tar package for installation, basically no configuration, directly use the configuration in the configure file.
(Supplement: if:-Bash:./configure: Permission denied
Use: chmod 755 configure)
2. Use the RPM package for Installation
This method requires a large number of instances on the local machine. when installing the RPM package, you must set a large number of configuration options and handle the dependencies between packages. That is, you must install the packages in a certain order, which is troublesome. This method is applicable to the packages in the system installation file, or the installation method is generally used when the product is released and packaged.
(2) below Ubuntu:
Run the sudo apt-Get install build-essential command to install g ++. If you need an additional automake tool, use apt-Get install automake. It's amazing. The characteristics of Ubuntu and Linux are amazing !!!