I'm trying to install gdal >2.0.1 and configure it with RStudio so that I can install the sf package.
I'm on CentOS 7.
First, I tried installing gdal using the below code and it successfully installed gdal version 1.11.4
sudo yum install gdal
sudo yum install gdal gdal-devel
Then I followed the steps in the answer of the below post to upgrade to version 2.4.0:
The steps were:
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
This installed version 2.4.0 successfully on the machine, however RStudio is not able to detect this version.
Running the below line in RStudio, returns: "1.11.4"
system2("gdal-config","--version")
How can I configure RStudio to detect the updated gdal?