【发布时间】:2016-12-02 09:31:54
【问题描述】:
我正在尝试在 R 上安装 TDA 包
> install.packages("TDA")
Installing package into ‘/home/more/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/TDA_1.5.tar.gz'
Content type 'unknown' length 2006514 bytes (1.9 MB)
==================================================
downloaded 1.9 MB
我收到了这个错误
./gmpxx.h:41:17: fatal error: gmp.h: No such file or directory
#include <gmp.h>
^
compilation terminated.
make: *** [diag.o] Error 1
ERROR: compilation failed for package ‘TDA’
* removing ‘/home/more/R/x86_64-redhat-linux-gnu-library/3.3/TDA’
Warning in install.packages :
installation of package ‘TDA’ had non-zero exit status
这是我的会话信息
R version 3.3.0 (2016-05-03)
platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
在我的 windows 7 上安装没有任何错误
我应该怎么做才能解决这个问题??
【问题讨论】:
-
是否安装了
gmp?sudo yum install gmp -
是的,它已安装。 gmp-6.0.0-12.e17_1.x86_64 已安装且最新版本
-
gmp-devel呢? -
刚刚安装。现在安装过程又出现了一个错误。 #include
^ 编译终止。 -
OK,安装完mpfr-devel就可以安装了。非常感谢!!
标签: r compiler-errors package installation