4

I recently upgraded Ubuntu from 14.04 to 16.04. I had previously been using QGIS 2.14 which I had built from source against GDAL 2.10.

After the upgrade QGIS no longer worked so I attempted to install QGIS today and it fails at qgis-providers as follows:

error while loading shared libraries: libhdf5.so.7: cannot open shared object file: No such file or directory

Any idea what I may be missing? I've attempted to remove all traces of my old QGIS install/libraries/dependencies.

I'm installing against the debian sources:

deb     http://qgis.org/debian xenial main
deb-src http://qgis.org/debian xenial main
4
  • That's more a linux problem than a gis problem... but please provide the output of ls /lib/ | grep libhdf5 (or from the appropriate lib folder). Maybe you just need to add a symlink: sudo ln -s libhdf5.so libhdf5.so.7 (once in the proper lib folder). Cheers
    – Victor
    Commented Nov 29, 2016 at 12:17
  • Thanks Victor - I found libhdf5 in /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so not sure where I should link it to though?
    – marty_c
    Commented Nov 29, 2016 at 12:29
  • Try ln -s libhdf5.so libhdf5.so.7 in the folder where you've found the file. If not, maybe in the main /lib/ folder. I can't really give you more precise information right now, I'm using manjaro. I'll have a look tonight on ubuntu.
    – Victor
    Commented Nov 29, 2016 at 16:51
  • I did check on ubuntu last evening but my libhdf5 file is not in the same location (and I actually have a libhdf5-serial.so or something of the sort. AndreJ's solution is the proper way to fix your problem. Mine is just a work-around.
    – Victor
    Commented Nov 30, 2016 at 12:29

1 Answer 1

1

The QGIS binaries from http://qgis.org/debian xenial main are compiled against GDAL 1.11.3, so you may run into trouble if you had GDAL 2.10 before.

I suggest to use the QGIS Ubuntugis repository http://qgis.org/ubuntugis xenial main and the Ubuntugis unstable ppa, which already has GDAL 2.10 for Xenial. Make sure to remove QGIS and GDAL before installing.

4
  • thanks - I've tried this and QGIS installs but throws a bunch of pythin errors when on startup when it tries to load plugins. The package runs but the last error is: Unable to load GdalTools plugin. The required "osgeo [python-gdal]" module is missing. Install it and try again.
    – marty_c
    Commented Nov 30, 2016 at 9:46
  • python-gdal2.1.0 is part of the ubuntugis gdal package. Pelase check if you have the same as launchpad.net/~ubuntugis/+archive/ubuntu/ubuntugis-unstable/… . I remember to have to install python-qgis manually from the command line too.
    – AndreJ
    Commented Nov 30, 2016 at 10:38
  • weird, according to synaptic I have python gdal 2.1.0 installed. Is it not linked correctly or installed in a weird location that QGIS can't find? Seems to be in /usr/share/doc/
    – marty_c
    Commented Nov 30, 2016 at 12:38
  • I have that folder too, but only containing some examples. Try askubuntu.com/questions/187888/… and installing GDAL, then QGIS from the command line. That way you see when packages are held back.
    – AndreJ
    Commented Nov 30, 2016 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.