r-RStudio服务器上的非零退出状态包安装错误



我一直试图在'inlabru'中运行一个LGCP,这花了很长时间,所以我已经设置了一个Unix帐户来访问RStudio服务器。现在的问题是,我收到了一些软件包的非零退出状态安装错误。特别是"rgdal"one_answers"inlabru"。我尝试过(对于"rgdal"(安装依赖项和PROJ/GDAL,但没有成功。错误的结束是:

configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘svglite’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/svglite’
Warning in install.packages :
installation of package ‘svglite’ had non-zero exit status
ERROR: dependency ‘terra’ is not available for package ‘raster’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/raster’
Warning in install.packages :
installation of package ‘raster’ had non-zero exit status
ERROR: dependencies ‘s2’, ‘units’ are not available for package ‘sf’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
ERROR: dependency ‘raster’ is not available for package ‘leaflet’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leaflet’
Warning in install.packages :
installation of package ‘leaflet’ had non-zero exit status
ERROR: dependencies ‘sf’, ‘svglite’ are not available for package ‘leafpop’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leafpop’
Warning in install.packages :
installation of package ‘leafpop’ had non-zero exit status
ERROR: dependencies ‘raster’, ‘terra’ are not available for package ‘satellite’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/satellite’
Warning in install.packages :
installation of package ‘satellite’ had non-zero exit status
ERROR: dependencies ‘leaflet’, ‘raster’, ‘sf’ are not available for package ‘leafem’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/leafem’
Warning in install.packages :
installation of package ‘leafem’ had non-zero exit status
ERROR: dependencies ‘leafem’, ‘leaflet’, ‘leafpop’, ‘raster’, ‘satellite’, ‘sf’ are not available for package ‘mapview’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/mapview’
Warning in install.packages :
installation of package ‘mapview’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp57pHoc/downloaded_packages’

我认为是库安装失败,因为它是一台服务器,但我曾尝试将.libPaths((更改为驱动器上的文件夹,但没有成功。我也试过运行

install.packages("rgdal", type="source", repos="http://R-Forge.R-project.org", configure.args=c('--with-gdal-config=/opt/local/bin/gdal-config'))

并获得

configure: error: gdal-config not found - configure argument error.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/home/staff4/ebryce/R/x86_64-pc-linux-gnu-library/4.1/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp57pHoc/downloaded_packages’

非常感谢您的帮助!

gdal(和朋友(未安装

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev 

最新更新