我想R上錯誤,當R上
> 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
安裝TDA包安裝TDA包,我得到這個錯誤
./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沒有任何錯誤
我該怎麼做才能解決這個問題?
是'gmp'安裝? 'sudo yum install gmp' – Vedda
是的,它的安裝。 gmp-6.0.0-12.e17_1.x86_64已安裝並且最新版本 – Chu
'gmp-devel'? – Vedda