gpt4 book ai didi

amazon-ec2 - rgdal 不会安装在 AWS RStudio AMI 上

转载 作者:行者123 更新时间:2023-12-02 01:00:12 25 4
gpt4 key购买 nike

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

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

干杯

> 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 ( https://cran.r-project.org/src/contrib/Archive/rgdal/ ) 安装一个最近但较旧的 rgdal 包,它不依赖于最新的 gdal 库,因此安装时不会抛出关于升级 GDAL 的错误。

关于amazon-ec2 - rgdal 不会安装在 AWS RStudio AMI 上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51173933/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com