Rgdal Installation Failed on Ubuntu 16.04

rgdal installation difficulty on ubuntu 16.04 LTS

Here is what I use to install on Ubuntu 16.04 with the latest R-cran PPA repositories:

sudo add-apt-repository 'deb https://mirror.ibcp.fr/pub/CRAN/bin/linux/ubuntu xenial/' 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install libgdal1-dev libproj-dev libgeos-dev
sudo apt-get install r-base-core

You can use another CRAN mirror depending on your location:
https://cran.r-project.org/mirrors.html

Then, install.packages("rgdal") should work.

If you want the latest spatial libraries on Ubuntu LTS versions, you can also use ubuntugis PPA: https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa

sudo add-apt-repository 'deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu xenial main' 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 314DF160
sudo apt update
sudo apt upgrade

More trouble Installing rgdal on ubuntu 16.04

The only way to solve this was to completely remove anaconda installation, following the instructions on https://conda.io/docs/user-guide/install/linux.html#uninstalling-anaconda-or-miniconda with some minor modifications for ubuntu 16.04, you have to open a terminal and remove the anaconda install directory:

rm -rf ~/anaconda3

rm -rf ~/.condarc ~/.conda ~/.continuum

Edit ~/.bashrc to remove the anaconda directory from your PATH environment variable.

After that the installation of rgdal

install.packages("rgdal")

goes without problems.

trouble in installing rgdal on ubuntu 16.04

I have finally been able to find a solution.

I followed the answer of this post

The miracle code is

sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
sudo apt update
sudo apt install gdal-bin python-gdal python3-gdal libgdal1-dev

thank you for your help

rgdal installation error on ubuntu 17.10


error: gdal-config not found

Is gdal installed ? ....

Solution : sudo apt install libgdal-dev : Provides /usr/bin/gdal-config

Ubuntu 16.04 R Installation: configure: gdal-config not found or not executable

You have to install gdal, proj & geos on your Linux system.

 sudo apt-get install libgdal1-dev gdal-bin libproj-dev proj-data proj-bin libgeos-dev

To compile yourself, see this script (backup)

Edit: For Ubuntu 18.04 Bionic or Mint 19 Tara

 sudo apt-get install libgdal-dev gdal-bin libproj-dev proj-data proj-bin libgeos-dev

Unable to install ‘sf’ R package on Ubuntu 16.04 LTS

This worked for me. Using

sudo aptitude install libgdal-dev

and then

devtools::install_github("r-spatial/sf")


Related Topics



Leave a reply



Submit