install rgeos 0.3-28 without error

When I try update rgeos 0.3-24 package in R 3.4.1, I get this error:

* installing to library ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library’
* installing *source* package ‘rgeos’ ...
configure: CC: clang
configure: CXX: clang++
configure: rgeos: 0.3-24
checking for /usr/bin/svnversion... yes
cat: inst/SVN_VERSION: No such file or directory
configure: svn revision: 
checking for geos-config... no
no
configure: error: geos-config not found or not executable.
ERROR: configuration failed for package ‘rgeos’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgeos’

* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rgeos’

Here is the solution.
First install geos and gdal complete frameworks from here:
http://www.kyngchaos.com/software:frameworks

At the time I write this article, the links are here:

Then load the last version of the rgeos package here (the .tar.gz version):
https://r-forge.r-project.org/R/?group_id=602
At the time I write this article, the link is here:

Then in terminal, enter these commands:

PATH=/Library/Frameworks/GEOS.framework/unix/bin/:$PATH
cd ~/Downloads
R CMD INSTALL rgeos_0.3-28.tar.gz 

You can enter the PATH=/Library/Frameworks/GEOS.framework/unix/bin/:$PATH in your .profile to not get an error next time.

Commentaires

Posts les plus consultés de ce blog

Standard error from Hessian Matrix... what can be done when problem occurs

stepAIC from package MASS with AICc

Install treemix in ubuntu 20.04