C 在哪里可以找到;gmp.h";?
我正在安装库,并收到以下错误消息:C 在哪里可以找到;gmp.h";?,c,makefile,C,Makefile,我正在安装库,并收到以下错误消息: xxxx@ubuntu$ make (cd num; make all) make[1]: Entering directory `/home/xxxx/num' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/home/xxxx/num' (cd itv; make all) make[1]: Entering directory `/home/xxxx/itv' gcc
xxxx@ubuntu$ make
(cd num; make all)
make[1]: Entering directory `/home/xxxx/num'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/xxxx/num'
(cd itv; make all)
make[1]: Entering directory `/home/xxxx/itv'
gcc -Wcast-qual -Wswitch -Werror-implicit-function-declaration -Wall -Wextra -Wundef -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wno-unused -std=c99 -U__STRICT_ANSI__ -O3 -DNDEBUG -I../num -I../apron -I/usr/include -I/usr/include -DNUM_MPQ -c -o itvMPQ.o itv.c
In file included from itv.h:9:0,
from itv.c:5:
../num/num.h:15:17: fatal error: gmp.h: No such file or directory
compilation terminated.
make[1]: *** [itvMPQ.o] Error 1
make[1]: Leaving directory `/home/xxxx/itv'
make: *** [c] Error 2
所以问题是它找不到gmp.h
,有人知道这个文件的位置吗,以及安装程序如何找到它?顺便说一下,目前我的Makefile
主要指向/usr
和/usr/local
Edit1:按照建议安装libgmp3 dev
后,当前的错误消息是。/num/num.h:16:18:致命错误:mpfr.h:没有这样的文件或目录
,有人知道它是关于哪个软件包的吗
Edit2:我已经安装了MPFR
,这确实有帮助,现在错误消息是gmp\u caml.c:17:33:致命错误:caml/camlildlruntime.h:没有这样的文件或目录
,有人能帮忙吗
Edit3:我已经完成了apt文件搜索camlidlruntime
,它返回camlidl:/usr/lib/ocaml/caml/caml/camlidlruntime.h
,但是在我的文件夹/usr/lib/ocaml/caml/
中没有camlidlruntime.h
,我如何检查我是否安装了MPFR的开发包
?它到底是关于哪个软件包的?您需要安装
libgmp3开发
取决于您的linux
yum install libgmp3-dev
apt-get install libgmp3-dev
在OS X上(如果您使用的是自制软件),请执行以下操作:
brew install gmp
因为您可能出于任何特殊原因需要此32位格式的库(就像对我一样) 您需要(在Ubuntu/Debian上)运行:
任何库后面的后缀
:i386
都将安装它的32位版本。在Centos 6.5中,它是sudo-yum-install-gmp-devel-gmp-status
ProTip:只需在yum中搜索gmp并查看yum提供的命令。我做了大量研究,最后我可以使用以下环境变量编译hue:
export CPFLAGS="-I/usr/local/include/gmp.h -I/usr/local/opt/openssl/include"
export CFLAGS="-I/usr/local/include/gmp.h"
export CXXFLAGS="-I/usr/local/include/gmp.h"
export LDFLAGS="-L/usr/local/lib -L/usr/local/opt/openssl/lib"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
对我来说,这很有效:-
apt-get install libgmp3-dev (Might vary in linux distro; this is for Ubuntu)
pip3 install gmpy --user
这听起来可能有点愚蠢: 每当我出错时,我都会:
sudo-apt-get-install-lib-dev
它以某种方式解决了这个问题。
不知道如何,与开发人员库或其他相关的内容谢谢您的回复。。。那确实有帮助。。。现在错误是
。/num/num.h:16:18:致命错误:mpfr.h:没有这样的文件或目录
,所以您知道它是关于哪个软件包的吗?请确保您拥有所有必需的lib。根据错误,您需要安装GNU MPFR。如果您花一些时间使用文件名进行谷歌搜索,您将找到文件的包名。在Centos 6.5中,它是:sudo-yum-install-gmp-devel-gmp-status。只需在百胜搜索gmp即可。@Daythours感谢您的证明。我添加了这个作为答案。应该阅读sudo-yum-install-gmp-gmp-devel-gmp-static-not-gmp status-not-gmp-status-worked-for-this-and-can-compile-on-Centos 7,谢谢!
apt-get install libgmp3-dev (Might vary in linux distro; this is for Ubuntu)
pip3 install gmpy --user