Installing gdal 2.0.1 or higher on CentOS 7.7

We are running RStudio Server Pro on CentOS 7.7.
We'd like to install the sf package which is dependent upon gdal 2.0.1 or higher.
Can someone explain to us how we install gdal?

The version provided via EPEL is unfortunately to old. Have you considered upgrading to CentOS 8? In case this is not possible, you can always compile from source. Here some older notes of mine for version 2.4.0:

sudo yum-builddep gdal
wget http://download.osgeo.org/gdal/2.4.0/gdal-2.4.0.tar.gz
tar xf gdal-2.4.0.tar.gz
cd gdal-2.4.0/
./configure
make -j4
sudo make install
# make sure the library can be found
echo /usr/local/lib | sudo tee -a /etc/ld.so.conf.d/local.conf
sudo ldconfig

It might be possible to avoid the final steps by setting suitable options for configure.

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.