Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Rmpfr on Ubuntu 18.04?

Tags:

linux

r

mpfr

After install.packages("Rmpfr") I'm getting this error

configure: error: Header file mpfr.h not found; maybe use
--with-mpfr-include=INCLUDE_PATH
ERROR: configuration failed for package ‘Rmpfr’

I typed the suggestion --with-mpfr-include=INCLUDE_PATH into the terminal w/o success.

like image 319
jay.sf Avatar asked Oct 19 '25 15:10

jay.sf


1 Answers

Look here: https://github.com/cran/Rmpfr

You first have to install the dependend libraries.

sudo apt-get install libmpfr-dev
sudo su - -c "R -e \"install.packages('Rmpfr', repos='http://cran.rstudio.com/')\""

It is also a better solution to install the R-Packages from the console, not inside R, since every user on the machine will have access to the package then. Otherwise it will just be in your personal library.

like image 51
DSGym Avatar answered Oct 21 '25 06:10

DSGym