在rgdal"gdal-config"中配置错误. [英] Configure error in rgdal "gdal-config"
问题描述
我目前正在Linux集群上的R中运行一些物种分布建模和丰富度映射.为了运行分析,我需要安装rgdal,以便建模包中的栅格函数正常运行.我已经安装了proj4和gdal.但是,当我尝试安装rgdal时,出现错误消息:
I am currently running some species distribution modelling and richness mapping in R on a linux cluster. In order to run my analyses I need to install rgdal so that the raster function in my modelling package works correctly. I have installed proj4 and gdal already. However when I attempt to install rgdal I get an error message:
checking for gdal-config... no
no
configure: error: gdal-config not found or not executable.
ERROR: configuration failed for package 'rgdal'
这是我用来安装rgdal软件包的命令:
This is the command I used to install rgdal package:
install.packages("rgdal", configure.args=c("--with-proj-include=/home/nikhail1/bin/proj-4.9.2/bin", "--with-proj-lib=/home/nikhail1/bin/proj-4.9,2/lib"))
尽管有gdal-config错误,但gdal似乎已安装到我的本地系统上(二进制和库文件夹位于我安装它们的地址中).在gdal安装过程中,我也没有看到任何错误消息.为什么会发生此错误?如何让R识别已安装此依赖项,或者确实存在问题,如何识别它?我在网上找到的大多数解决方案都是针对我未使用的Debian和Ubuntu系统的.我无权使用sudo apt-get或yum命令.我只安装了proj 4.9.2,我是否缺少对gdal的依赖?
However despite the gdal-config error, gdal seems to be installed onto my local system (the binary and library folders are present in the address to which I installed them). I also did not see any error messages during the gdal installation process. Why is this error occurring? How do I get R to recognize that this dependency is installed, or indeed if there is a problem how do I identify it? Most of the solutions I have found online are specific to Debian and Ubuntu systems which I am not using. I do not have authority to use sudo apt-get or yum commands. Are there any dependencies of gdal I am missing, as I have only installed proj 4.9.2?
我是linux系统的新手,还有rgdal和gdal软件包.
I am new to the linux system, and the rgdal and gdal packages.
非常感谢您的协助
亲切的问候,
尼哈伊尔
推荐答案
在Linux上的R中安装RGDAL
在R中运行此命令:
Installing RGDAL in R on Linux
Run this command in R:
# install package from CRAN
# but specify the library director
# the download method
# and the configuration arguments
# to allow for source installs
install.packages( pkgs = "rgdal"
, lib = "./R_Packages"
, method = "curl"
, configure.args = c(
"--with-gdal-config=/Library/Frameworks/GDAL.framework/Programs/gdal-config"
, "--with-proj-include=/p/home/bin/proj4/include"
, "--with-proj-lib=/p/home/bin/proj4/lib"
)
)
答案来自交叉引用在LINUX系统上安装rgdal时出错?和无法安装rgdal .
这篇关于在rgdal"gdal-config"中配置错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!