一尘不染

错误:找不到gdal-config

linux

请指出我缺少的一点:

openSUSE 11.3


anisha@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’

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

anisha@linux-y3pi:~/Desktop/R> gdal-config 
Usage: gdal-config [OPTIONS]
Options:
 [--prefix[=DIR]]
 [--libs]
 [--dep-libs]
 [--cflags]
 [--datadir]
 [--version]
 [--ogr-enabled]
 [--formats]
 anisha@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     
>

编辑:


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

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

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

阅读 1334

收藏
2020-06-03

共1个答案

一尘不染

你需要的-dev包报头和共享库链接, 开发 除了正常的包 部署 。就发行版而言,有两种不同的用例。

在我的分布中:

edd@max:/tmp$ dpkg -l | grep gdal | cut -c-72
ii  libgdal1-1.7.0                                1.7.3-6ubuntu3        
ii  libgdal1-dev                                  1.7.3-6ubuntu3        
edd@max:/tmp$

R CMD INSTALL rgdal_0.7-8.tar.gz提供了CRAN的所有构建时检查功能,可以按预期从CRAN程序包中正常工作。

2016年末更新: 正如@ JoshO’Brien在评论中指出

较小更新:在2016年运行Ubuntu
14.04.2的这里libgdal1h似乎已被替换libgdal1(尽管libgdal1-dev仍然需要)。至少当我尝试apt-get install libgdal1

对于Ubuntu 16.04,对应的行是
sudo apt-get install libgdal1i

上游库的这种重命名很常见。这样的东西apt-cache search libgdal可以帮助找到当前的软件包名称。但是, 重要的
关键是libgdal-dev构建“抽象”开发包时需要libgdal1i通过依赖来引入“具体的”当前运行时包(此处:)。

2020-06-03