37

I want to install the Rmpfr library of R, so I type within R:

install.packages("Rmpfr")

This package requires the GMP C library to be installed, which in Ubuntu can be installed typing on the terminal

sudo apt-get install libgmp-dev

So, after I try to install Rmpfr library in R, I receive an error message containing

configure: error: GNU MP not found, or not 4.1.4 or up, see http://gmplib.org

The problem is, I already have GNU MP installed, and its version is 5.1.2. So, something is wrong with me, maybe.

Any clues? :-) Thanks!

Celso
  • 649
  • 1
  • 6
  • 15
  • 1
    What version of Ubuntu? I was just able to install using Saucy. Also have you installed the latest version of libmpfr-dev? – James King Mar 09 '14 at 02:25
  • You can run `./configure` manually and examine `config.log` to see what actually failed. – Vincent Zoonekynd Mar 09 '14 at 02:52
  • 1
    I use Saucy. I have the 3.1.1-2 version of libmpfr-dev, which is the last one. – Celso Mar 12 '14 at 23:35
  • I ran `./configure` first on the R GMP package, and `config.log` returned this: configure:534: checking for __gmpz_ui_sub in -lgmp configure:553: cc -o conftest -I/usr/local/include -L/usr/local/lib conftest.c -lgmp 1>&5 /usr/bin/ld: cannot find crt1.o: No such file or directory /usr/bin/ld: cannot find crti.o: No such file or directory /usr/bin/ld: cannot find -lc /usr/bin/ld: cannot find crtn.o: No such file or directory – Celso Mar 12 '14 at 23:43
  • collect2: error: ld returned 1 exit status configure: failed program was: #line 542 "configure" #include "confdefs.h – Celso Mar 12 '14 at 23:47

2 Answers2

80

In my case it was solved by installation of libgmp3-dev

$ sudo apt-get update
$ sudo apt-get install libgmp3-dev
truf
  • 2,843
  • 26
  • 39
2

It worked after I installed build-essential and libboost. Yes, I had something lacking on my system. :-)

Celso
  • 649
  • 1
  • 6
  • 15