gpt4 book ai didi

r - 在 R 上安装 TDA 包时出错

转载 作者:行者123 更新时间:2023-12-01 12:26:46 26 4
gpt4 key购买 nike

我正在尝试在 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

这是我的 session 信息

R version 3.3.0 (2016-05-03)
platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

在我的windows 7上安装没有任何错误

我应该怎么做才能解决这个问题?

最佳答案

我在 Ubuntu 16.04 上解决了这个问题:

sudo apt install libgmp3-dev libmpfr-dev

关于r - 在 R 上安装 TDA 包时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38628766/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com