configure: error: cannot compute suffix of object files: cannot compile

CentOS 6.5下安装gcc-4.8.4 make的时候提示以下错误:
configure: error: cannot compute suffix of object files: cannot compile

解决办法:
我的gmp, mpfr, mpc都是使用默认参数安装的,没指定任何参数

./configure
make
make install

所以直接使用下面的命令设置环境变量就可以了:

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

你可能感兴趣的:(configure: error: cannot compute suffix of object files: cannot compile)