RGBAL安装在Ubuntu 16.04上失败 [英] Rgdal installation failed on ubuntu 16.04

查看:109
本文介绍了RGBAL安装在Ubuntu 16.04上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直尝试在ubuntu 16.04上从RStudio版本1.0.44安装rgdal,然后出现 gdal-config not found 错误.我通过安装libgdal1-dev& libproj软件包,但现在出现以下错误.有人帮我解决这个问题.

I have been trying to install rgdal from RStudio Version 1.0.44 on ubuntu 16.04 then I was getting the gdal-config not found error. I resolved this by installing the libgdal1-dev & libproj packages but now i'm getting the following error. Someone help me resolve this.

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
unable to load shared object '/home/hetch/R/x86_64-pc-linux-gnu-library/3.3/rgdal/libs/rgdal.so':
/usr/lib/x86_64-linux-gnu/libgeos_c.so.1: undefined symbol:_ZN4geos4geom18IntersectionMatrixC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE 
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/hetch/R/x86_64-pc-linux-gnu-library/3.3/rgdal’
Warning in install.packages :
installation of package ‘rgdal’ had non-zero exit status

推荐答案

我在尝试安装rgdal软件包时遇到了一些问题,但最终我成功了. 我的问题是需要gdal> 2.0,并且默认情况下ubuntu 16.04不附带它,因此需要额外的软件包.

I have had some issues trying to install rgdal package but finally I succeeded. My problem was that gdal > 2.0 is needed, and it does not ship with ubuntu 16.04 by default, so extra packages are needed.

我最终安装了以下软件包:

I ended up installing the following packages:

sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt install gdal-bin python-gdal python3-gdal libgdal1-dev

此外,还需要r> 3.3,所以我最终像这样更新了ubuntu的默认r-base安装:

Additionally, r > 3.3 is needed too, so I ended up updating ubuntu's default r-base installation like this:

sudo add-apt-repository 'deb https://cran.rediris.es/bin/linux/ubuntu xenial/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt update

希望它也对您有用.

这篇关于RGBAL安装在Ubuntu 16.04上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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