I recently updated my system from Ubuntu 14.04 (trusty tahr) to Ubuntu 16.04.4 LTS (Xenial Xerus).

While installing QGIS I get an error message:

/usr/lib/qgis/crssync: error while loading shared libraries: libnetcdf.so.7: cannot open shared object file: No such file or directory

I updated the repositories:

sudo apt-get update

and installed the latest version

sudo apt-get install libnetcdf-dev

While checking the installation of the library I found that libnetcdf.so.11 is installed

Checking out the available repositories for Xenial for ibnetcdf at: https://packages.ubuntu.com/xenial/libdevel/libnetcdf-dev

I found that the available library is: libnetcdf11 (= 1:4.4.0-2) which corresponds with the libnetcdf.so.11 file I found.

What do I do in order to install libnetcdf.so.7 and fulfil the dependencies for QGIS?


I checked out the situation and I had a conflict between two installed gdal installations.

sudo apt-get purge --auto-remove gdal-bin

sudo apt-get purge --auto-remove libgdal

sudo apt-get purge --auto-remove libkml-dev

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

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

from a post at: http://r-sig-geo.2731867.n2.nabble.com/Problems-with-installing-rgdal-on-Ubuntu-quot-checking-gdal-linking-with-libs-only-no-quot-td7590255.html

then I ran a fresh gdal installation:

sudo apt-get install libgdal-dev


sudo apt-get update
sudo apt-get install qgis python-qgis qgis-plugin-grass

Seems to work just right

  • For completeness, can you add where you got the wrong GDAL version from? – AndreJ Apr 14 '18 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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