Skip to content
Prev 24753 / 29559 Next

Problems with installing rgdal on Ubuntu "checking gdal: linking with --libs only... no"

You were right - I had two gdals, a manual installation and an 
installation from apt* and this confused my system.

So this is what I did:

1. Removed packages 'gdal-bin', 'libgdal-dev' etc using:

sudo apt-get purge --auto-remove gdal-bin
sudo apt-get purge --auto-remove libgdal
sudo apt-get purge --auto-remove libkml-dev

2. Manually removed files from '/usr/local' e.g.:

sudo find /usr/local/bin/ -name 'gdal*' -delete
sudo find /usr/local/lib/ -name 'libgdal*' -delete

After that rgdal installs without a problem.

I am surprised that I had to manually delete files from the disk (I 
guess manual install means manual deletion?), but yes this does solve 
the problem.

Many thanks Edzer and Roger!
On 04/08/16 19:13, Edzer Pebesma wrote: