1

我正在尝试在 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 based on GMP C lib, it won't find GMP ,但我安装了 GMP

4

1 回答 1

4

你有安装libmpfr4libmpfr-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:~$ 

你需要libmpfr4libmpfr-dev。我相当确定您的构建在您显示的行之前失败,因为由于缺少库而导致“无法加载”表明链接,并且可能编译失败。

您是从Rmpfr源代码包安装的,对吗?

于 2014-03-26T17:27:01.670 回答