尝试在R中安装rgdal
库
没有以下消息
> install.packages("rgdal")
Installing package into ‘/Users/rpopat/Library/R/3.2/library’
(as ‘lib’ is unspecified)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0100 1592k 100 1592k 0 0 1235k 0 0:00:01 0:00:01 --:--:-- 1236k
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
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 ‘/Users/rpopat/Library/R/3.2/library/rgdal’
* restoring previous ‘/Users/rpopat/Library/R/3.2/library/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/3z/1cdvjt8s5l73fq0k7tzpfll80000gn/T/Rtmpy3KTTV/downloaded_packages’
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin15.0.0 (64-bit)
Running under: OS X 10.11.1 (El Capitan)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] sp_1.2-1
loaded via a namespace (and not attached):
[1] tools_3.2.2 grid_3.2.2 lattice_0.20-33
我试过......
非常感谢任何帮助。
干杯!
答案 0 :(得分:0)
Ripley博士解释说你应该使用以下代码来安装rgdal和rgeos:
setRepositories(ind = c(1,6))#所以你从CRAN获得了依赖关系 install.packages(c('rgeos','rgdal'))
它适用于(el capitan)OS X 10.11.4