8

I followed a ./configure, make, make install approach when I originally installed GDAL on my Ubuntu machine, but now I want to upgrade to 1.10.

Unfortunately, I want to use apt to perform the upgrade, but after performing an apt-get install I run gdal-config --version I still get a version of 1.9.

I've tried manually renaming the .so files in /usr/local/lib and /usr/lib but I still am unable to manually uninstall GDAL.

Has anyone else had success doing this?

1
  • Does make uninstall do anything? Mar 17, 2014 at 22:59

2 Answers 2

6

I don't know if this will help, but it worked out for me. I was looking to upgrade GDAL, and since I had installed it manually from source, I wanted to uninstall the old version first. So I read somewhere (sorry but I had so many tabs open that I can't find it now) that I should just install the latest package and that would override the previous. And I read another comment saying next time instead of using sudo make install I should use sudo checkinstall which creates a deb package wich is uninstallable later running sudo dpkg -r <name_of_your_package> so I just installed the version I had with sudo checkinstall (overriding what I had, and creating the package) and then I uninstalled that using sudo dpkg -r gdal. I know it's not the most elegant thing, but it worked for me.

2
  • 1
    It might not be elegant, but it works like a charm! Sep 1, 2015 at 12:55
  • This solution worked for me. However, I had trouble with QGIS not loading gdal afterwards due to Python2.7 bindings. I resolved this by removing to folder /usr/local/lib/python2.7/dist-packages/GDAL-1.11.0-py2.7-linux-x86_64.egg
    – mace
    Sep 10, 2016 at 9:13
3

You need to locate your manually installed binary:

$> which gdalinfo
/usr/local/bin

And then you have to locate other manually installed binaries and remove them (BEWARE BEFORE REMOVING COMMAND: you certainly have other manually installed binaries here)

$> ls /usr/local/bin
gdal-config gdal_contour gdal_grid gdal_rasterize gdal_translate gdaladdo gdalbuildvrt gdaldem gdalenhance gdalinfo gdallocationinfo gdalmanage gdalserver gdalsrsinfo gdaltindex gdaltransform gdalwarp ogr2ogr ogrinfo ogrlineref ogrtindex

When you manually install GDAL, you also install local lib, they should be here: /usr/local/lib/ with the libgdal* wildcard and inside gdalplugins. You'll want to remove them also.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .