3

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

by:

/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).

3

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.

0

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, privacy policy and cookie policy

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