1

I am trying to install the R package Rmpfr on Linux Ubuntu and I get the following error message:

*** 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

I am already aware that similar questions have been asked, but the error message is different and I have tried the suggestion on this post: In R, using Ubuntu, try to install a lib depending on GMP C lib, it won't find GMP, but I have GMP installed

Community
  • 1
  • 1
blJOg
  • 451
  • 2
  • 4
  • 14
  • (this would work on a newer Ubuntu) How are you installing Rmpfr? What did you download from where and which instructions did you follow? – Marc Glisse Mar 27 '14 at 12:49

1 Answers1

4

Do you have the libmpfr4 and libmpfr-dev packages installed?

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:~$ 

You need both libmpfr4 and libmpfr-dev. I am fairly certain that your build failed before the line you showed because 'cannot load' due to a lack of library suggests that the linking, and possibly compilation failed.

You are installing from the Rmpfr source package, correct?

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • I have libmpfr-dev 2.4.2-3ubuntu1 but I don't have libmpfr4. When I try to install using apt-get I get: E: Package libmpfr4 has no installation candidate – blJOg Mar 27 '14 at 11:18
  • Yes, I am installing Rmpfr from source. I still haven't managed to install libmpfr4. I am getting a slightly different error message now `*** 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': /usr/local/lib/R/site-library/Rmpfr/libs/Rmpfr.so: undefined symbol: mpfr_digamma Error: loading failed Execution halted ERROR: loading failed ` – blJOg Mar 28 '14 at 09:04