1

I'm trying to get ESRI File Geodatabase working on a Ubuntu 18.04 instance. I have followed the instructions in the readme contained in https://github.com/Esri/file-geodatabase-api/blob/master/FileGDB_API_1.5.1/FileGDB_API_1_5_1-64gcc.zip

I have GDAL version 3.0.4 installed.

Everything completes, but when I get

ogrinfo --formats | grep GDB

I get the following

OpenFileGDB -vector- (rov): ESRI FileGDB

From my investigation this appears to be down the version of gdal I have installed. I have tried different versions of gdal from the Ubuntu Official repo and also the ubuntu unstable gis one.

Unfortunately company policy prevents me from compiling packages myself

How can I resolve this?

Edit:

I have now tried compiling this from source

Downloaded https://github.com/Esri/file-geodatabase-api/blob/master/FileGDB_API_1.5/FileGDB_API_1_5_64gcc.zip and extracted it to /opt/FileGDB

Then added export PATH="$PATH:/opt/FileGDB_API"

to my .profile file then run source .profile

sudo apt-get build-dep gdal
apt-get source gdal
edited the debian/rules file to add --with-fgdb=/opt/FileGDB_API
dpkg-buildpackage -us -uc

It fails with

/usr/bin/ld: skipping incompatible /opt/FileGDB_API/lib/libFileGDBAPI.so when searching for -lFileGDBAPI
/usr/bin/ld: skipping incompatible //usr/local/lib/libFileGDBAPI.so when searching for -lFileGDBAPI
/usr/bin/ld: cannot find -lFileGDBAPI
/usr/bin/ld: skipping incompatible /opt/FileGDB_API/lib/libfgdbunixrtl.so when searching for -lfgdbunixrtl
/usr/bin/ld: skipping incompatible /opt/FileGDB_API/lib/libfgdbunixrtl.a when searching for -lfgdbunixrtl
/usr/bin/ld: skipping incompatible //usr/local/lib/libfgdbunixrtl.so when searching for -lfgdbunixrtl
/usr/bin/ld: skipping incompatible //usr/local/lib/libfgdbunixrtl.a when searching for -lfgdbunixrtl
/usr/bin/ld: cannot find -lfgdbunixrtl
collect2: error: ld returned 1 exit status
GNUmakefile:55: recipe for target 'libgdal.la' failed
make[3]: *** [libgdal.la] Error 1
make[3]: Leaving directory '/home/stuart/gdal/new/gdal-2.2.3+dfsg'
GNUmakefile:64: recipe for target 'check-lib' failed
make[2]: *** [check-lib] Error 2
make[2]: Leaving directory '/home/stuart/gdal/new/gdal-2.2.3+dfsg'
debian/rules:142: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory '/home/stuart/gdal/new/gdal-2.2.3+dfsg'
debian/rules:77: recipe for target 'build' failed
make: *** [build] Error 2
```

2 Answers 2

0

You need the 'FileGDBAPI.dll' file installed into the C:\Program Files\QGIS 3.10\bin folder, as well as the 'ogr_FileGDB.dll' file installed into the C:\Program Files\QGIS 3.10\bin\gdalplugins folder. One of these is installed during the QGIS installation, but I forget which one. The source for the Esri-specific file geodatabase driver is documented at this link: https://glenbambrick.com/2017/03/10/setting-up-gdal-with-filegdb/.

3
  • Linux OS's don't have a C:\ drive and don't use .dlls.
    – user2856
    Commented Sep 12, 2020 at 22:34
  • True that on the C: drive, but doesn't something like github.com/pleiszenburg/zugbruecke enable use of .dlls in a Linux environment? At any rate, sorry for wasting your valuable time, but a downvote? Really?? Commented Sep 13, 2020 at 23:34
  • Sorry to be harsh, but this doesn't answer the question at all. The OP is not using Windows, the question specifically states Ubuntu 18.04. So I felt a downvote was appropriate and left a comment as to why. I rarely downvote, don't do so lightly and generally leave an explanatory comment when I do.
    – user2856
    Commented Sep 14, 2020 at 10:25
0

You downloaded the MacOS version: FileGDB_API_1_5_64gcc.zip Mac, gcc

You should use the Linux version since you are using Ubuntu.

This link is for FileGDB API 5.1 (a bit newer than the version you tried to download) 64bit Linux with GCC 5 or later (Ubuntu 18.04 uses GCC 7.5.0):

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.