I want to install rgdal
for "R version 3.2.3 (2015-12-10)"
.
I downloaded and installed
- GDAL 1.11 Complete
- PROJ framework v4.9.2-2
- GEOS framework v3.5.0-1
from KyngChaos
Then in RStudio I typed install.packages("rgdal")
which gave me this:
> ....
>
> configure: CC: clang configure: CXX: clang++ configure: rgdal:
> 1.1-1 checking for /usr/bin/svnversion... yes configure: svn revision:
> 572 checking for gdal-config...
> no no configure: error: gdal-config
> not found or not executable. ERROR: configuration failed for package
> ‘rgdal’
> * removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/rgdal’
> Warning in install.packages : installation of package ‘rgdal’ had
> non-zero exit status
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)
locale:
[1] de_AT.UTF-8/de_AT.UTF-8/de_AT.UTF-8/C/de_AT.UTF-8/de_AT.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] tools_3.2.3
I also tried in the terminal
R CMD INSTALL rgdal_1.1-1.tar --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/Programs/gdal-config
--with-proj-include=/Library/Frameworks/PROJ.framework/Headers
--with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib'
and
sudo R CMD INSTALL –configure-args=’–with-proj-include=/usr/local/lib’ rgdal_1.1-1.tar
No luck!
I had the same error Running R 3.4.0 on macOS Sierra (10.12). So I used homebrew to install gdal, then
rgdal
installed as per usual in Rin Terminal
in R
Finally solved it.
Here is how Ive done it! OS X 10.10.5 R 3.2.3 GDAL 1.1
gdal-config
file by typing this in you shellecho 'export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH' >> ~/.bash_profile
and thensource ~/.bash_profile
gdalinfo --version
. That should come back with something likeGDAL 1.11.3, released 2015/09/16
.install.packages("rgdal")
works (if youve done step 1-3). However, that was not the case for me. So, proceed with 5 if youre still having troubles..tar
file.sudo R CMD INSTALL –configure-args=’–with-proj-include=/usr/local/lib’ rgdal_1.1-1.tar
. That still gave me an error:configure: error: proj_api.h not found in standard or given locations. ERROR: configuration failed for package ‘rgdal’
R CMD INSTALL rgdal_1.1-1.tar --configure-args='--with-gdal-config=/Library/Frameworks/GDAL.framework/Programs/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/Headers --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib'
That should work. Try by starting
R
and typelibrary(rgdal)
.Note: With
rgoes
I expierenced similar problems. This helped me. Try:For pointing to the
config
file. Its here/Library/Frameworks/GEOS.framework/unix/bin/geos-config
Quick note building on previous answer by @Stophface that might be useful to someone:
I did all steps listed above, but the rgdal installation in Terminal still gave me the error of
configure: error: proj_api.h not found in standard or given locations
. Yet (and without knowing exactly why), I managed to install it from R.app using pretty much the same specifications:And thanks again for your answer!
I installed it via conda on my Mac (OS X 10.10.5). The installation was simple. If you're new to conda, check this http://conda.pydata.org/docs/r-with-conda.html
R Package installation: