无法在Rstudio服务器上安装软件包

时间:2019-04-15 14:40:24

标签: r rstudio-server rgdal

我想在rstudio服务器上安装诸如rgdal,rsaga和plotkml之类的软件包来执行空间分析。但是,安装软件包时会收到错误消息。

我尝试使用install package命令安装软件包,然后使用library命令加载它们。但是它已加载失败。

> install.packages("rgdal")
Installing package into ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/rgdal_1.4-3.tar.gz'
Content type 'application/x-gzip' length 1687331 bytes (1.6 MB)
==================================================
downloaded 1.6 MB


configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpejyfby/downloaded_packages’
> install.packages("RSAGA")
Installing package into ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘rgdal’

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: R_HOME: /usr/lib64/R
configure: CC: gcc -m64 -std=gnu99
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status
ERROR: dependency ‘rgdal’ is not available for package ‘RSAGA’
* removing ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5/RSAGA’
Warning in install.packages :
  installation of package ‘RSAGA’ had non-zero exit status

configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status
ERROR: dependency ‘rgdal’ is not available for package ‘RSAGA’
* removing ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5/RSAGA’
Warning in install.packages :
  installation of package ‘RSAGA’ had non-zero exit status
ERROR: dependencies ‘rgdal’, ‘RSAGA’ are not available for package ‘plotKML’
* removing ‘/home/gis/R/x86_64-redhat-linux-gnu-library/3.5/plotKML’
Warning in install.packages :
  installation of package ‘plotKML’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmpejyfby/downloaded_packages’
> library(rgdal)
Error in library(rgdal) : there is no package called ‘rgdal’
> library(RSAGA)
Error in library(RSAGA) : there is no package called ‘RSAGA’
> library(plotKML)
Error in library(plotKML) : there is no package called ‘plotKML’

我希望软件包能够成功安装和加载。

0 个答案:

没有答案