rgdal无法在AWS RStudio AMI上安装

3
我已成功启动最新的RStudio AWS EC2实例(louisaslett.com,RStudio-1.1383_R-3.4.2…ubuntu-16.04-LTS-64)。在此实例中,R大部分操作都如预期一样运行,并且我可以安装和打开许多包。但是,如果我尝试安装rgdal或gdalUtils包,则会出现错误。
以下是我尝试安装rgdal时的控制台输出。gdalUtils的输出太长无法在此处包含,但两者都包括文本“error: upgrade GDAL to 1.11.4 or later”,这可能是问题所在,但我不知道如何纠正。 非常感谢您的想法或建议。
> 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’
1个回答

2

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


我在这里找到了一个有用的笔记,介绍如何从存档中安装软件包 链接packageurl <- "https://cran.r-project.org/src/contrib/Archive/rgdal/rgdal_1.2-20.tar.gz" install.packages(packageurl, repos=NULL, type="source") - Joshua Baboo

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接