Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing R package for Linux

Tags:

Im trying to install a package named "rgeos" on R 3.3, but when I type

install.packages("rgeos") 

But it returns me the following error (same happens with other packages, but not all the packages):

> * installing *source* package ‘rgeos’ ... ** package ‘rgeos’ successfully unpacked and MD5 sums checked configure: CC: gcc configure: CXX: g++ configure: rgeos: 0.3-19 checking for /usr/bin/svnversion... no configure: svn revision: 524 checking for geos-config... no no configure: error: geos-config not found or not executable. ERROR: configuration failed for package ‘rgeos’ * removing ‘/home/kdg/R/x86_64-pc-linux-gnu-library/3.3/rgeos’ >  > The downloaded source packages are in >   ‘/tmp/Rtmpsa5pDo/downloaded_packages’ Warning message: In > install.packages("rgeos") :   installation of package ‘rgeos’ had > non-zero exit status 

Any clues how con install this package?

like image 223
Tangent3 Avatar asked Aug 12 '16 18:08

Tangent3


People also ask

How do I manually install an R package?

Go into R, click on Packages (at the top of the R console), then click on "Install package(s) from local zip files", then find the zip file with arm from wherever you just saved it. Do the same thing to install each of the other packages you want to install.


1 Answers

It seems that when running R in Linux is necessary to install some build tools. As in this case, in the terminal:

sudo apt-get install libgeos-dev 

Then try package install again.

hints from here

like image 77
Tangent3 Avatar answered Oct 05 '22 05:10

Tangent3