Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R packages rgdal / rgeos "is not available (for R version 3.1.1)" [duplicate]

Tags:

r

Having difficulty installing some packages in a new R build on OSX Mavericks. Both rgeos and rgdal return e.g.:

package 'rgeos' is available as a source package but not as a binary

Warning in install.packages :
  package 'rgeos' is not available (for R version 3.1.1)

On my windows system both packages have installed fine for R 3.1.1, so is this a Mavericks/OSX version issue or do I have an issue with my build? Changing the library repository makes no difference. I've looked at building from binaries, but e.g. on the rgeos homepage it states "OS X Mavericks binaries: r-release: not available" so I'm snookered.

Grateful for advice.


Edit:

Trying the suggestion by @Andrie:

> install.packages('rgeos', type='source')
Installing package into ‘/Users/robinedwards/Library/R/3.1/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.ma.imperial.ac.uk/src/contrib/rgeos_0.3-6.tar.gz'
Content type 'application/x-gzip' length 240510 bytes (234 Kb)
opened URL
==================================================
downloaded 234 Kb

* installing *source* package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
configure: CC: clang
configure: CXX: clang++
configure: rgeos: 0.3-4
checking for /usr/bin/svnversion... yes
configure: svn revision: 450
checking geos-config usability... 
./configure: line 2056: geos-config: command not found
no
configure: error: geos-config not usable
ERROR: configuration failed for package ‘rgeos’
* removing ‘/Users/robinedwards/Library/R/3.1/library/rgeos’
Warning in install.packages :
  installation of package ‘rgeos’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/_s/ppznw4sx7p51kwv__hj3d8540000gn/T/RtmpK40xj7/downloaded_packages’

And a screenshot of the build page:

enter image description here

like image 998
geotheory Avatar asked Mar 19 '23 17:03

geotheory


1 Answers

You need to install rgdal and rgeos from source.

  1. First install the package rgeos
  2. Then install rgdal from source.

Try this:

install.packages('rgeos', type="source")
install.packages('rgdal', type="source")
like image 118
Andrie Avatar answered Mar 23 '23 14:03

Andrie