I'm using QGIS LTR 2.14.7 running on debian. 2 versions of GDAL are installed on my computer (1.10 and 2.0).

  • 1.10 is out of box GDAL version (doesn't support ECW).
  • 2.0 is compiled (by me) to support ECW.

In QGIS I change system environment libraries like it: GDAL_DATA=/usr/local/share/gdal (I've installed GDAL 2 in this path).

But QGIS continues to use GDAL 1.10 version and not GDAL 2. Have you an idea to force QGIS to use GDAL 2?

I can't uninstall GDAL 1 because QGIS needs this version to start (version of official repositories).

I've tried "dirty" solution by replacing existing symbolic link:

/usr/lib/libgdal.so.1 -> libgdal.so.1.17.1


/usr/lib/libgdal.so.1 -> /usr/local/lib/libgdal.so.20

This method permit to read ECW files.

But all modifications on a integer field make troubles. I've read that GDAL 1.0 use 32bits integer and GDAL 2.0 uses 64bits integer. So QGIS will not update field (type error: type not match with field type).

  • Self-Compiling QGIS as well? Or put GDAL 2.0 in a virtual box.
    – AndreJ
    Commented Sep 30, 2016 at 11:59
  • @AndreJ Put GDAL2.0 in a virtual box?
    – Mathieu D
    Commented Sep 30, 2016 at 12:06
  • did you set LD_LIBRARY_PATH - possibly in a wrapper script
    – Ian Turton
    Commented Sep 30, 2016 at 15:12
  • You can install Oracle virtual box with any Linux OS you want, and compile GDAL 2.0 in that, With shared folders, you can access your data from within and outside the box. You would have to run GDAL in the box from the command line, unless you compile QGIS as well from source.
    – AndreJ
    Commented Sep 30, 2016 at 15:24

2 Answers 2


You cannot just run QGIS with a different GDAL version than it was compiled against. It might work for minor updates (if they are ABI compatible) but will certainly not work with a major version change (1.x to 2.x).

So the answer is: if you compile GDAL yourself, also compile QGIS yourself.


An alternative that worked for me is to self-compile exactly the same GDAL version that the paket manager has installed, then copy everything from /usr/local/ to /usr with admin rights.

See How do i install ESRI File GDB API in Ubuntu 16.04 so QGIS 2.8 can see it? for a FileGDB related GDAL compilation.

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.