centos65 编译gcc-4.9.4
作者:互联网
# gcc依赖
yum install gmp-devel mpfr-devel
wget ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-0.8.1.tar.gz
tar zxvf mpc-0.8.1.tar.gz
cd mpc-0.8.1 & make &make install
#下载gcc
#下载太慢,百度gcc-4.9.4.tar.gz, 其他教育站点下载
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-4.9.4/gcc-4.9.4.tar.gz
cd gcc-4.9.4
mkdir build
cd build
./configure --disable-multilib
make
错误 configure: error: cannot compute suffix of object files: cannot compile
configure: error: cannot compute suffix of object files: cannot compile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
#如果制定了安装目录
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/gcc-4.6.3/mpc-0.9/mpc_install/lib:/opt/gcc-4.6.3/gmp-5.0.4/gmp_install/lib:/opt/gcc-4.6.3/mpfr-3.1.0/mpfr_install/lib
错误 找不到gcc
yum remove gcc-4.8.5-39.el7.x86_64 卸载gcc
yum -y install gcc-c++ 重新安装gcc
标签:gcc,mpc,tar,4.9,gz,install,centos65 来源: https://www.cnblogs.com/WillingCPP/p/13924420.html