我正在尝试在 Linux Ubuntu 上安装 R 包 Rmpfr,我收到以下错误消息:
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/Rmpfr/libs/Rmpfr.so':
libmpfr.so.4: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
我已经知道有人问过类似的问题,但错误信息不同,我已经尝试了这篇文章的建议:
In R, using Ubuntu, try to install a lib depending on GMP C lib, it won't find GMP, but I have GMP installed
最佳答案
你有没有libmpfr4
和 libmpfr-dev
安装包?
edd@max:~$ COLUMNS=90 dpkg -l | grep mpfr | cut -c-80
ii libmpfr-dev:amd6 3.1.1-2 amd64 multiple precision floating-poi
ii libmpfr4:amd64 3.1.1-2 amd64 multiple precision floating-poi
edd@max:~$
你需要两个
libmpfr4
和 libmpfr-dev
.我相当确定您的构建在您显示的行之前失败,因为由于缺少库而导致“无法加载”表明链接,并且可能编译失败。您正在从
Rmpfr
安装源码包,对吗?
关于r - 在 Ubuntu 上安装 Rmpfr 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22668381/