configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.解决方法

最近编译GCC的时候.遇到这个问题:
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+. 
Try the --with-gmp and/or --with-mpfr options to specify their locations. 
Copies of these libraries' source code can be found at their respective 
hosting sites as well as at  ftp://gcc.gnu.org/pub/gcc/infrastructure/
See also  http://gcc.gnu.org/install/prerequisites.html  for additional info. 
If you obtained GMP and/or MPFR from a vendor distribution package, make 
sure that you have installed both the libraries and the header files. 
They may be located in separate packages. 
网上查了很久也没有解决.最后是到http://gcc.gnu.org/install/prerequisites.html上看了一下解释.以下是原文描述:
MPFR Library version 2.4.2 (or later)
Necessary to build GCC. It can be downloaded from  http://www.mpfr.org/. If an MPFR source distribution is found in a subdirectory of your GCC sources named  mpfr, it will be built together with GCC. Alternatively, if MPFR is already installed but it is not in your default library search path, the  --with-mpfr configure option should be used. See also  --with-mpfr-lib and  --with-mpfr-include
MPC Library version 0.8.1 (or later)
Necessary to build GCC. It can be downloaded from  http://www.multiprecision.org/. If an MPC source distribution is found in a subdirectory of your GCC sources named  mpc, it will be built together with GCC. Alternatively, if MPC is already installed but it is not in your default library search path, the  --with-mpc configure option should be used. See also  --with-mpc-lib and  --with-mpc-include. 按图索骥,终于找到解决方法如下:
1.到http://www.mpfr.org/下一下2.4.2版本以上的MPFR.然后放到要编译的GCC目录下,注意目录名必须为mpfr
2.到http://www.multiprecision.org/下一下0.8.1版本以上的MPC.然后放到要编译的GCC目录下,注意目录名必须为mpc
重新编译.OK~~~
love 钓鱼竿
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值