一、安装Gcc前,需要安装依赖:
1、gmp安装:
下载:gmp-6.0.0a.tar.bz2
解压:tar jxf gmp-6.0.0a.tar.bz2
cd gmp-6.0.0
./configure --prefix=/usr/local/gmp-6.0.0 && make
make install
2、mpfr安装:
下载:mpfr-3.1.5.tar.gz
解压:tar zxvfv mpfr-3.1.5.tar.gz
cd mpfr-3.1.5
./configure --prefix=/usr/local/mpfr-3.1.5 --with-gmp=/usr/local/gmp-6.0.0 && make
make install
3、mpc安装:
下载:mpc-1.0.2.tar.gz
解压:tar zxvfv mpc-1.0.2.tar.gz
cd mpc-1.0.2
./configure --prefix=/usr/local/mpc-1.0.2 --with-gmp=/usr/local/gmp-6.0.0 --with-mpfr=/usr/local/mpfr-3.1.5 && make
make install
二、添加到环境变量:
注意上面安装的路径
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-1.0.2/lib:/usr/local/gmp-5.0.1/lib:/u