在rstudio中安装rgdal库-在libgdal中找不到GDALAllRegister [英] Install rgdal library in rstudio - GDALAllRegister not found in libgdal

查看:397
本文介绍了在rstudio中安装rgdal库-在libgdal中找不到GDALAllRegister的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Ubuntu 12.10(数量级)和R 2.15.1(烤棉花糖)在Rstudio(0.97.332)中安装rgdal库.

I'm trying to install rgdal library in Rstudio (0.97.332), using Ubuntu 12.10 (quantal) and R 2.15.1 (Roasted Marshmallows).

我在Ubuntu中安装了有关gdal的以下内容:

I have the following installed regarding gdal in Ubuntu:

$ apt-cache search gdal
dans-gdal-scripts - GDAL contributed tools by Geographic Information Network of Alaska
gdal-bin - Geospatial Data Abstraction Library - Utility programs
libgdal-dev - Geospatial Data Abstraction Library - Development files
libgdal-doc - Documentation for the Geospatial Data Abstraction Library
libgdal-perl - Perl bindings to the Geospatial Data Abstraction Library
libgdal-ruby - Ruby bindings to the Geospatial Data Abstraction Library
libgdal-ruby1.8 - Ruby 1.8 bindings to the Geospatial Data Abstraction Library
libgdal1 - Geospatial Data Abstraction Library
libgdal1-1.9.0-grass - GRASS extension for the GDAL library
libgdal1-dev - Geospatial Data Abstraction Library - Development files
python-gdal - Python bindings to the Geospatial Data Abstraction Library
qlandkartegt - GPS mapping (GeoTiff and vector) and GPSr management

我还安装了proj:

$ apt-cache search proj-
libproj-dev - Cartographic projection library (development files)
proj-bin - Cartographic projection library (tools)
proj-data - Cartographic projection filter and library (datum package)
proj-ps-doc - PostScript docs for cartographic projection filters and library
$ apt-cache search proj.4
libgeo-proj4-perl - PROJ.4 library for cartographic projections
python-mpltoolkits.basemap - matplotlib toolkit to plot on map projections
python-mpltoolkits.basemap-data - matplotlib toolkit to plot on map projections (data package)
python-mpltoolkits.basemap-doc - matplotlib toolkit to plot on map projections (documentation)
python-pyproj - Python interface to PROJ.4 library

现在我启动rstudio并运行 install.packages("rgdal",dependencies = TRUE)我得到以下信息:

Now I start rstudio and run install.packages("rgdal",dependencies=TRUE) I get the following:

> install.packages("rgdal",dependencies=TRUE)
Installing package(s) into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/rgdal_0.8-5.tar.gz'
Content type 'application/x-gzip' length 1584889 bytes (1.5 Mb)
opened URL
==================================================
downloaded 1.5 Mb

* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: rgdal: 0.8-4
checking for /usr/bin/svnversion... no
configure: svn revision: 449
configure: gdal-config: gdal-config
checking gdal-config usability... yes
configure: GDAL: 1.9.0
checking GDAL version >= 1.7.1... yes
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no
./configure: line 3373: g++: command not found
./configure: line 3388: g++: command not found
configure: Install failure: compilation and/or linkage problems.
configure: error: GDALAllRegister not found in libgdal.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/local/lib/R/site-library/rgdal’
Warning in install.packages :
  installation of package ‘rgdal’ had non-zero exit status

我不知道什么是GDALAllRegister,下一步应该是什么.

I do not know what is GDALAllRegister and what should be my next step.

推荐答案

检查您是否真正安装了c ++.我怀疑您没有.

check if you have c++ really installed. I suspect that you don't have it.

g++: command not found

这篇关于在rstudio中安装rgdal库-在libgdal中找不到GDALAllRegister的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆