我正在尝试在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
这是我的sessionInfo
R version 3.3.0 (2016-05-03)
platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
我的Windows 7上的安装没有任何错误
我应该怎么做才能解决这个问题?
最佳答案
这在Fedora 23上对我有用:sudo yum install gmp-devel mpfr-devel