Perl   发布时间:2022-04-07  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了perl – 安装时出现Math :: GMP错误大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图安装Math :: GMP,但它一直在失败,我不知道从哪里开始.这就是我输入的内容,这里是指向日志文件的输出:
[root@confeng Math-GMP-2.06-VEVNP7]# cpanm Math::GMP
--> Working on Math::GMP
Fetching http://www.cpan.org/authors/id/T/TU/TURNSTEP/Math-GMP-2.06.tar.gz ... OK
Configuring Math-GMP-2.06 ... OK
Building and tesTing Math-GMP-2.06 ... FAIL
! Installing Math::GMP failed. See /root/.cpanm/build.log for details.
[root@confeng Math-GMP-2.06-VEVNP7]#

我检查了日志,我不知道我应该有什么结构
这是/root/.cpanm/build.log的日志

cpanm (App::cpanminus) 1.5011 on perl 5.008008 built for i386-linux-thread-multi
Work directory is /root/.cpanm/work/1336128898.6464
You have make /usr/bin/make
You have /usr/bin/wget
You have /bin/tar: tar (GNU tar) 1.15.1
You have /usr/bin/unzip
Searching Math::GMP on cpanmetadb ...
--> Working on Math::GMP
Fetching http://www.cpan.org/authors/id/T/TU/TURNSTEP/Math-GMP-2.06.tar.gz
-> OK
Unpacking Math-GMP-2.06.tar.gz
Entering Math-GMP-2.06
checking configure dependencies from META.yml
Configuring Math-GMP-2.06
Running Makefile.PL
checking if your kit is complete...
Looks good
WriTing Makefile for Math::GMP
-> OK
Finding PREREQ from Makefile ...
Building and tesTing Math-GMP-2.06
cp lib/Math/GMp.pR_329_11845@ blib/lib/Math/GMp.pR_329_11845@
AutoSplitTing blib/lib/Math/GMp.pR_329_11845@ (blib/lib/auto/Math/GMp)
/usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -      typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap  GMP.xs > GMP.xsc && mv GMP.xsc GMP.c
gcc -c   -D_REENTRANT -D_GNU_sourcE -fno-Strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_sourcE -D_FILE_OFFSET_BITS=64 -I/usr/inc$
GMP.xs:4:17: error: gmp.h: No such file or directory
GMP.xs: In function âconstantâ:
GMP.xs:49: warning: label ânot_thereâ defined but not used
GMP.c: In function âXS_Math__GMP_new_from_scalarâ:
GMP.c:93: error: âmpz_tâ undeclared (first use in this function)
GMP.c:93: error: (Each undeclared identifier is reported only once
GMP.c:93: error: for each function it appears in.)
GMP.c:93: error: âRETVALâ undeclared (first use in this function)
GMP.xs:70: warning: implicit declaration of function âmpz_init_set_strâ
GMP.c: In function âXS_Math__GMP_new_from_scalar_with_baseâ:
GMP.c:114: error: âmpz_tâ undeclared (first use in this function)
GMP.c:114: error: âRETVALâ undeclared (first use in this function)
GMP.c: In function âXS_Math__GMP_destroyâ:
GMP.c:133: error: âmpz_tâ undeclared (first use in this function)

解决方法

是重要的部分.

您必须安装libgmp的开发文件/标头.在我的openSUSE系统上,相关文件是/usr/include/gmp.h,该包名为gmp-devel.在Debian /派生系统上,该包称为libgmp3-dev.

大佬总结

以上是大佬教程为你收集整理的perl – 安装时出现Math :: GMP错误全部内容,希望文章能够帮你解决perl – 安装时出现Math :: GMP错误所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。