Skip to content

rgdal installation problem

7 messages · Christopher Fusting, Robin W Hunnewell, Roger Bivand +1 more

#
Hi,?

Could you - or any other mac users who've been successful installing rgdal - elaborate how you did it??

I'm trying to install rgdal in my iMac (os X 10.6.7). I have latest Mac R app. version 2.13.0?
I downloaded the?GDAL framework 1.8 and its dependencies from the kyngchaos site -- under the GDAL section of the page:?

http://www.kyngchaos.com/software/frameworks


But not sure the that the installation has put it in the right configuration, path for loading into R.

In R, I installed and loaded library 'sp' ?which rgdal needs..

Then tried to install the GDAL package - I go to the R Package Installer,?select 'Local Binary Package' from the popup, then click 'Install...'.?
I was able to locate and select the rgdal tarball to install and load it for use in R, but?get error message:
1: 'tar' returned non-zero exit code 1 
2: In file.rename(file.path(tmpDir, pkgname), instPath) :
  cannot rename file '/Users/robinhunnewell/Library/R/2.13/library/file3af03e3f/GDAL' to '/Users/robinhunnewell/Library/R/2.13/library/GDAL', reason 'No such file or directory'
3: unable to move temporary installation '/Users/robinhunnewell/Library/R/2.13/library/file3af03e3f/GDAL' to '/Users/robinhunnewell/Library/R/2.13/library/GDAL' 

Is it because GDAL is not in the right place? Thanks v much if anyone can anyone help!
Robin
On 02 May, 2011,at 11:23 AM, Christopher Fusting <cfusting at gmail.com> wrote:
I had a similar problem. The port under the GDAL section of this page
worked for me:

http://www.kyngchaos.com/software/frameworks

_Chris

2011/5/2 Ant?nio M. Rodrigues <amcrgrodrigues at gmail.com>

  
    
#
On Tue, 3 May 2011, Robin W Hunnewell wrote:

            
Usually, OSX users say setRepositories(ind=1:2) to install from CRAN and 
CRAN extras, where OSX binaries for R 2.13 are provided by Prof. Brian 
Ripley. The direct URL is:

http://www.stats.ox.ac.uk/pub/RWin/bin/macosx/leopard/contrib/2.13/

This has static GDAL and standard drivers. Kyngchaos now also has an R 
2.13 binary, which depends on the frameworks also provided there - it was 
added recently at user request, and provides a larger number of drivers.

Roger

  
    
#
Thank you. ?sorry if this is basic; had just hoped to find a step-by-step guide for Idiots on how to install GDAL and rgdal on OSX.?

I downloaded?the comprehensive GDAL framework?provided by William Kyngesburye:

http://www.kyngchaos.com/

Help and 'read me' files say to install the GDAL?framework with dependencies first, then an rgdal binary from the same?site.
But I'm not sure how to compile and configure GDAL the right way - so that it gets to the R library and can then be located.
I'm sure it's just a basic step, but?for someone new to this it's a little confusing..
Thanks very much for the URL below, will try to work it through
On 03 May, 2011,at 02:21 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:

        
On Tue, 3 May 2011, Robin W Hunnewell wrote:

            
Usually, OSX users say setRepositories(ind=1:2) to install from CRAN and 
CRAN extras, where OSX binaries for R 2.13 are provided by Prof. Brian 
Ripley. The direct URL is:

http://www.stats.ox.ac.uk/pub/RWin/bin/macosx/leopard/contrib/2.13/

This has static GDAL and standard drivers. Kyngchaos now also has an R 
2.13 binary, which depends on the frameworks also provided there - it was 
added recently at user request, and provides a larger number of drivers.

Roger

  
    
#
On Tue, 3 May 2011, Robin W Hunnewell wrote:

            
If you do not need drivers other than the standard ones (shapefile, 
geotiff, etc.), within R do only:

setRepositories(ind=1:2)
install.packages("rgdal")

Only use Kyngchaos if you need GDAL and the frameworks for other purposes 
other than rgdal, or if you need extra drivers for rgdal not provided as 
standard from CRAN extras.

Please report back if this meets your needs.

Roger

  
    
#
Yes, thank you Very much! -- that is just what I needed. For my purposes, the standard drivers for rgdal provided from CRAN will more than meet my needs.

So for the record, I did the following:
And then;
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.8.0, released 2011/01/12
Path to GDAL shared files: /Users/robinhunnewell/Library/R/2.13/library/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009
Path to PROJ.4 shared files: /Users/robinhunnewell/Library/R/2.13/library/rgdal/proj

All set now.
Thanks so much,?

Robin
On 03 May, 2011,at 03:22 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:

        
On Tue, 3 May 2011, Robin W Hunnewell wrote:

            
If you do not need drivers other than the standard ones (shapefile, 
geotiff, etc.), within R do only:

setRepositories(ind=1:2)
install.packages("rgdal")

Only use Kyngchaos if you need GDAL and the frameworks for other purposes 
other than rgdal, or if you need extra drivers for rgdal not provided as 
standard from CRAN extras.

Please report back if this meets your needs.

Roger