问题
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

