rgdal installation failed on ubuntu 14.04 [closed]

喜你入骨 提交于 2019-12-11 13:01:58

问题


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 (https://launchpad.net/~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’

I had rgdal installed before without problem and was trying to update it to a newer version as required for R.

I will greatly appreciate any help


回答1:


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"))'


来源:https://stackoverflow.com/questions/38213027/rgdal-installation-failed-on-ubuntu-14-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!