【问题标题】:R install of rgdal failing in R 3.2.2 OS X 10.11.1 (El Capitan)R 在 R 3.2.2 OS X 10.11.1 (El Capitan) 中安装 rgdal 失败
【发布时间】:2015-11-24 17:38:10
【问题描述】:

尝试在 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

我试过了……

  • 从生物导体安装
  • 单独安装 GDAL
  • 下载旧版本的 rgdal 并从本地二进制文件安装(安装成功,但在我加载包时崩溃)。

非常感谢任何帮助。

干杯!

【问题讨论】:

  • 您是否安装了gdal?如果没有,您可以使用自制软件来安装它
  • 感谢我通过自制软件安装了 gdal 并且成功了

标签: r installation gdal rgdal


【解决方案1】:

Ripley 博士解释说,您应该使用以下代码来安装 rgdal 和 rgeos:

setRepositories(ind = c(1,6)) # 这样你就可以从 CRAN 获取依赖项 install.packages(c('rgeos', 'rgdal'))

它适用于(el capitan)OS X 10.11.4

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-02-11
    • 1970-01-01
    • 2016-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多