Here is the compilation of installation, Yum/apt-get and other installation methods are relatively simple, do not elaborate.
1, download source package: gcc.gnu.org
2, decompression:
TAR-XJVF gcc-4.9.0.tar.bz2
3 . Download the dependent packages required for compiling:
The simplest way to execute directly:
./contrib/download_prerequisites
Script Automatic Download dependent package GMP, MPFR,MPC. You can also manually download and then move to the/gcc-4.9.0 directory to install it automatically, or compile the installation yourself first
4, execute configure command, produce makefile:
mkdir Build
CD Build
.. /configure--enable-checking=release--enable-languages=c,c++--disable-multilib
Create the build directory first, and compile it into this directory
5, compile
Make-j4
4 indicates the number of threads, long time, faster with multiple threads
6, installation
Make install
question:
C + + compiler missing or inoperational
g++ Command not found
Checking dependency style of g++ ... none
No usable dependency style found
The above problems are due to the system does not have C + + compiler, installed 4.8 or 4.9 before the need to have an ISO c++98 compiler, installed a OK, I really do not know which can install an earlier version of GCC such as 4.4.7
The compilation process is recorded in the Config.log, and there are problems to view the file first.
Google is one of the best ways to solve the problem.