2

I've compiled GDAL on Debian with FileGDB support. The output of

ogr2ogr --formats | grep GDB 

is

OpenFileGDB -vector- (rov): ESRI FileGDB
FileGDB -vector- (rw+): ESRI FileGDB

and

gdalinfo --version

is

GDAL 2.0.2, released 2016/01/26

I then installed qgis using "sudo apt-get install qgis" and it's version 2.14

I expected it to link to GDAL and have FileGDB support. No such luck. In QGIS About it says it's using GDAL 1.10.1

How do I connect it to the binaries that are compiled and have FileGDB support?

1

On Ubuntu 18.04.4 LTS you can activate a built-in GDAL if the compiled version is close to the expected version by the stable QGIS repo - here is the 3.12.1 called Bucuresti.

enter image description here

Use the version 1.4 of the FileGDB library because version 1.5 and upper are supported by GDAL since its 2.3 versions only.

Install first in /usr/local/lib the content of the FileGDB driver downloaded from the ESRI site : filegdb_api_1_4-64.tar.gz and build your local GDAL.

Before to compile the release/2.2 branch of GDAL, you need to configure the install options as following :

./configure --with-fgdb=/usr/local/lib/FileGDB_API-64 --prefix=/usr
--with-static-proj4=/home/dev/gdal/proj.4

Then compile and install your own version of GDAL as QGIS can use it.

sudo make install

Everything works fine for me. The screenshot above reports than QGIS uses a different version of GDAL 2.2.4 than the default one (2.2.3).

The ESRI FileGDB is automatically added as a new options of the Data Source Manager.

enter image description here

| improve this answer | |
2

The QGIS version purpose in official repositories is build on GDAL 1, but you've compiled GDAL version 2, so you have to force QGIS to use GDAL version 2. You can test the "dirty solution" proposed at the link below (make save of the original links mkdir /usr/lib/ligdal_save && cp -vd /usr/ligdal* /usr/libgdal_save/)

See How to force QGIS to use GDAL version?

You can test proposed solutions in comment and more simply set environment system variable in QGIS preferences.

You can add: GDAL_DATA=/the/path.of/compiled/gdal or LD_LIBRARY_PATH=/the/path/of/compiled/gdal

I test it tomorrow (when I come back to office).

| improve this answer | |
1

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.

| improve this answer | |

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.