Unable to install ‘sf’ R package on Ubuntu 16.04 LTS

喜夏-厌秋 提交于 2019-12-11 15:28:53

问题


I'm not able to install sf R package on Ubuntu 16.04 LTS. I tried

install.packages("sf")

as well as

devtools::install_github("r-spatial/sf")

after running

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install libudunits2-dev libgdal-dev libgeos-dev libproj-dev 

Getting the following error message:

configure: error: gdal-config not found or not executable.

ERROR: configuration failed for package ‘sf’

Wonder what is the way to install sf?


回答1:


This worked for me. Using

sudo aptitude install libgdal-dev

and then

devtools::install_github("r-spatial/sf")


来源:https://stackoverflow.com/questions/48628463/unable-to-install-sf-r-package-on-ubuntu-16-04-lts

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