[已解决]Ubuntu18.04安装rgdal sf失败 configure: error: gdal-config not found or not executable

文章目录[隐藏]

问题

Ubuntu18.04安装rgdal sf失败,报错:



configure: CC: gcc -std=gnu99

configure: CXX: g++ -std=gnu++11

checking for gdal-config... no

no

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

ERROR: configuration failed for package 'sf'

* removing '/usr/local/lib/R/site-library/sf'

The downloaded source packages are in ‘/tmp/RtmpQ8xJW2/downloaded_packages’ Warning message: In install.packages(“sf”) : installation of package ‘sf’ had non-zero exit status

解决办法

安装依赖包即可:



sudo apt-get install libgdal-dev libproj-dev gdal-bin -y


This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/570.html
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy