gpt4 book ai didi

linux - 错误 : gdal-config not found while installing R dependent packages whereas gdal is installed

转载 作者:IT老高 更新时间:2023-10-28 12:34:32 24 4
gpt4 key购买 nike

请指出我遗漏的一点:

openSUSE 11.3


xx@linux-y3pi:~/Desktop/R> sudo R CMD INSTALL rgdal_0.7-12.tar.gz 
root's password:
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: gdal-config: gdal-config
checking gdal-config usability... ./configure: line 1353: gdal-config: command not found
no
Error: gdal-config not found
The gdal-config script distributed with GDAL could not be found.
If you have not installed the GDAL libraries, you can
download the source from http://www.gdal.org/
If you have installed the GDAL libraries, then make sure that
gdal-config is in your path. Try typing gdal-config at a
shell prompt and see if it runs. If not, use:
--configure-args='--with-gdal-config=/usr/local/bin/gdal-config'
with appropriate values for your installation.

ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/lib64/R/library/rgdal’

xx@linux-y3pi:~/Desktop/R> whereis gdal-config
gdal-config: /usr/local/bin/gdal-config

xx@linux-y3pi:~/Desktop/R> gdal-config
Usage: gdal-config [OPTIONS]
Options:
[--prefix[=DIR]]
[--libs]
[--dep-libs]
[--cflags]
[--datadir]
[--version]
[--ogr-enabled]
[--formats]
xx@linux-y3pi:~/Desktop/R>

> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base
>

xx@linux-y3pi:~/Desktop/R> gdal-config --version
1.9.0

xx@linux-y3pi:~/Desktop/R> proj
Rel. 4.8.0, 6 March 2012
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]

linux-y3pi:~ # $PATH
bash: /home/xx/qtsdk-2010.05/qt/bin/:/home/xx/qtsdk-2010.05/bin:/home/xx/qtsdk-2010.05/qt/bin:/home/xx/qtsdk-2010.05/qt/bin/:/home/xx/qtsdk-2010.05/bin:/usr/lib64/mpi/gcc/openmpi/bin:/home/xx/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games: No such file or directory

最佳答案

在 Ubuntu 18.04 中

我通过 sudo apt install libgdal-dev 解决了这个问题希望有人觉得这很有帮助。上面的一些答案似乎已经过时且冗长。

在早期版本中(有 apt-get)

sudo apt-get install libgdal-dev

关于linux - 错误 : gdal-config not found while installing R dependent packages whereas gdal is installed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12141422/

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