我正在尝试在运行ubuntu linux 14.04的计算机中安装rgdal.我正在使用的R版本是:3.3.1.我从常规的ubuntu存储库中安装了gdal和相关软件包,并且还使用了ubuntu-gis ppa( launchpad/~ubuntugis/+archive/ubuntu/ppa ).在这两种情况下,编译时我都会得到相同的错误消息:
I am trying to install rgdal in my computer that runs ubuntu linux 14.04. The R version that I am using is: 3.3.1. I installed gdal and related packages from the regular ubuntu repository and also using the ubuntu-gis ppa (launchpad/~ubuntugis/+archive/ubuntu/ppa). In both cases, I've got the same error message while compiling:
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I/usr/include/gdal -I"/home/magdiel/R/x86_64-pc-linux-gnu-library/3.3/sp/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c inverser.c -o inverser.o inverser.c:3:22: fatal error: projects.h: No existe el archivo o el directorio #include <projects.h> ^ compilation terminated. make: *** [inverser.o] Error 1 ERROR: compilation failed for package ‘rgdal’我以前没有问题地安装过rgdal,并试图根据R的要求将其更新为较新的版本.
I had rgdal installed before without problem and was trying to update it to a newer version as required for R.
我将非常感谢您的帮助
推荐答案在2016年2月,在Ubuntu 14.04.2(和R 3.2.2)上,我需要以下各项才能同时获得 rgdal 和互补的(通常非常有用) gdalUtils 软件包:
In February 2016, on Ubuntu 14.04.2 (and with R 3.2.2), I needed the following to get both rgdal and the complementary (and frequently very useful) gdalUtils package installed:
sudo apt-get update sudo apt-get -y install libgdal1h sudo apt-get -y install libgdal1-dev sudo apt-get install libproj-dev sudo apt-get install gdal-bin Rscript 'install.packages(c("rgdal", "gdalUtils"))'更多推荐
在Ubuntu 14.04上的rgdal安装失败
发布评论