error Building GCC: requires GMP 4.1+ and MPFR 2.3.0+.
错误提示如上
在red hat Enterprise 4上玩,发现没有gcc编译器,故安装
官网地址:http://gcc.gnu.org/releases.html,
执行 ./configure
就出现上述错误
提示需要安装GMP 4.1+ and MPFR2.3.0+。故安装
安装完GMP4.1,提示默认安装目录 /usr/local/lib
安装完MPFR2.3.0,提示默认安装目录/usr/local/lib
并按照提示,添加环境变量
继续到gcc目录下执行 ./configure
还是提示错误。
继续上网找,解决办法
原文如下:
Just want to contribute my 2cts here (in case someone has googled here):
I downloaded the latest package:
gcc-4.4.2.tar.bz2
gmp-4.3.1.tar.bz2
mpfr-2.4.2.tar.bz2
and then untar all of them.
then execute this:
mv gmp-4.3.1 gcc-4.4.2/gmp #即移动gmp-4.3.1解压目录到gcc的解压目录下
mv mpfr-2.4.2 gcc-4.4.2/mpfr #即移动mpfr-2.4.2解压目录到gcc的解压目录下
and the
cd gcc-4.4.2
./configure
OS:
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
done, it configure and compile without problem.