rgdal不会安装在AWS RStudio AMI上 [英] rgdal won't install on AWS RStudio AMI

查看:166
本文介绍了rgdal不会安装在AWS RStudio AMI上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功地启动了最新的RStudio AWS EC2实例(louisaslett.com,RStudio-1.1383_R-3.4.2…ubuntu-16.04-LTS-64)。在这种情况下,R通常按预期运行,我可以安装和打开许多软件包。但是,如果尝试安装gdalUtils软件包的rgdal之一,则会出现错误。

I have managed to successfully launch the most recent RStudio AWS EC2 instance (louisaslett.com, RStudio-1.1383_R-3.4.2…ubuntu-16.04-LTS-64). R operates mostly as expected in this instance, and I can install and open a number of packages. However I get an error if I try to install either of the rgdal of gdalUtils packages.

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

Below is the console output when I attempt to install rgdal. The output for the gdalUtils install is too long to include here, but both include the text "error: upgrade GDAL to 1.11.4 or later" which I suspect is the problem, but have no idea how to correct. Any thoughts or advice would be greatly appreciated.

欢呼声

> 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’


推荐答案

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

I have since run into the same issue running Rstudio on the google cloud. In both cases a solution was relatively simple - install a recent but older rgdal package from cran (https://cran.r-project.org/src/contrib/Archive/rgdal/) which wasnt dependent on the most recent gdal libraries, and therefore installed without throwing the error about upgrading GDAL.

这篇关于rgdal不会安装在AWS RStudio AMI上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆