I just solved Repairing broken GDAL and PROJ.4 on Ubuntu? which was blocking use of ogrinfo and ogr2ogr, only to find that these utilities are garbled in one more way: whenever I run any of these, I get following error (this is for ogrinfo, for ogr2ogr it's analogical):
ERROR 1: ogrinfo was compiled against GDAL 1.9 but current library version is 1.10
I think I understand the cause: I mistakenly installed GDAL 1.9 manually through make-install as suggested here; make-uninstall is not possible for it. Ogrinfo was compiled to this version of GDAL and forgot about version 1.10 shipped with my QGIS (2.10). But I'm stuck here, with no idea how to re-compile ogr against the right version of GDAL.
What I tried:
- reinstall QGIS (with
sudo apt-get --purge autoremoveto clean the dependencies after uninstall) - trash
ogrinfo,ogr2ogrand even wholeGDAL-1.9directory; then I have recovered theogrfiles but not gdal 1.9, though I can do it any time - few more options like
sudo apt-get autoclean
Perhaps I could cleanly purge and install the ogr package if I knew it's exact name. Or do I need to purge the old version completely and then somehow (how?) tell the QGIS installer to install ogr as well?
I searched for all the gdal files on my computer and found that I have files for gdal-1.10 in /usr/bin/ and those for 1.9 in /usr/local/bin/. I manually deleted all the 1.9 files - @evilGenius pointed to this. Now there's just the last step: to point the system to the correct path to the binaries. As /usr/bin/ogrinfo it works perfectly.