To the company test Server environment, manual installation gcc-4.9.0 A lot of effort, recorded as follows.
1, install GCC, g++, the system source default installation version is 4.4.7;
2, install dependency package GMP, MPFR, MPC, pay attention to the installation sequence;
3, modify the dynamic library link path, add GMP, MPFR, MPC;
4, compile and install Gcc-4.9, create a new directory Gcc-build to store make process to produce files;
5, copy the Gcc-4.9 header file to the directory/usr/include/c++;
6, modify Ld_library_path, PATH and Cplus_include_path;
7, establish a new GCC, g++ soft connection.
1,Yum-YInstall GCC Yum-YInstall GCC-c++2,mkdir/usr/local/gmp-4.3.2 ./configure--prefix=/usr/local/gmp-4.3.2/ Make Make Install mkdir/usr/local/mpfr-2.4.2 ./configure--prefix=/usr/local/mpfr-2.4.2--with-gmp=/usr/local/gmp-4.3.2 Make Make Install mkdir/usr/local/mpc-0.8.1 ./configure--prefix=/usr/local/mpc-0.8.1--with-gmp=/usr/local/gmp-4.3.2--with-mpfr=/usr/local/mpfr-2.4.2 Make Make Install3, export Ld_library_path= $LD _library_path:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/mpc-0.8.1/Lib4,mkdir GCC-bulid CDGCC-Build:/GCC-4.9.0/configure--prefix=/usr/local/GCC-4.9.0--exec-prefix=/usr/local/GCC--enable-languages=c,c++--with-gmp=/usr/local/gmp-4.3.2--with-mpfr=/usr/local/mpfr-2.4.2--with-mpc=/usr/local/mpc-0.8.1--disable-Multilib Make Make Install5,CP-r/usr/local/GCC-4.9.0/include/c++/4.9.0/usr/include/c++6, export Ld_library_path= $LD _library_path:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib:/usr/local/mpc-0.8.1/lib:/usr/local/GCC/lib64 Export PATH= $PATH:/usr/local/GCC/Bin Export Cplus_include_path= $CPLUS _include_path:/usr/include/c++/4.9.0:/usr/include/c++/4.9.0/x86_64-unknown-linux-GNU7,MV GCC GCC-4.4.7 LN-s/usr/local/GCC/bin/GCC./GCC MVg++ g++-4.4.7 LN-s/usr/local/GCC/bin/g++ g++
Build and install Gcc-4.9 under CentOS