Linux下gcc编译器的安装、故障排除

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 MPFR 2.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.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值