rgdal 不会安装在 AWS RStudio AMI 上

2024-03-14

我已成功启动最新的 RStudio AWS EC2 实例(louisaslett.com、RStudio-1.1383_R-3.4.2…ubuntu-16.04-LTS-64)。在这种情况下,R 的运行基本符合预期,我可以安装和打开许多软件包。但是,如果我尝试安装 rgdal 或 gdalUtils 软件包中的任何一个,则会出现错误。

以下是我尝试安装 rgdal 时的控制台输出。 gdalUtils 安装的输出太长,无法包含在此处,但都包含文本“错误:将 GDAL 升级到 1.11.4 或更高版本”,我怀疑这是问题所在,但不知道如何纠正。 任何想法或建议将不胜感激。

Cheers

> install.packages("rgdal")
Installing package into ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.3-3.tar.gz'
Content type 'application/x-gzip' length 1670656 bytes (1.6 MB)
==================================================
downloaded 1.6 MB
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgdal: 1.3-3
checking for /usr/bin/svnversion... yes
configure: svn revision: 759
checking whether g++ supports C++11 features by default... no
checking whether g++ supports C++11 features with -std=gnu++11... yes
configure: C++11 support available
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 1.11.3
checking GDAL version >= 1.11.4... no
configure: error: upgrade GDAL to 1.11.4 or later
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/rstudio/R/x86_64-pc-linux-gnu-library/3.4/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
        ‘/tmp/RtmpGUxbcA/downloaded_packages’

此后我在谷歌云上运行 Rstudio 时遇到了同样的问题。在这两种情况下,解决方案都相对简单 - 从 cran 安装最新但较旧的 rgdal 软件包(https://cran.r-project.org/src/contrib/Archive/rgdal/ https://cran.r-project.org/src/contrib/Archive/rgdal/),它不依赖于最新的 gdal 库,因此安装时不会抛出有关升级 GDAL 的错误。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

rgdal 不会安装在 AWS RStudio AMI 上 的相关文章

随机推荐