我正在尝试在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
答案 0 :(得分:3)
您是否安装了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
源包安装的,对吗?