问题
CentOS8下R安装包rgdal失败
* installing *source* package ‘sf’ ...
** package ‘sf’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -m64
configure: CXX: g++ -m64 -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 ‘/home/liujason/R/x86_64-redhat-linux-gnu-library/3.6/sf’
Warning in install.packages :
installation of package ‘sf’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmphP6AWX/downloaded_packages’
解决方案
缺少最新版的GDAL,需要在Linux系统中编译安装即可。
sudo yum groupinstall "Development Tools" -y
sudo yum install wget -y
sudo yum install postgresql postgresql-devel proj proj-devel -y