I'm trying to import a ShapeFile inside my PostGIS database using the ogr2ogr, however I'm receiving an error:

ogr2ogr: symbol lookup error: ogr2ogr: undefined symbol: _ZNK17GDALDriverManager14GetDriverCountEv

The command that I'm using is that:

ogr2ogr -append -f "PostgreSQL" PG:"host= dbname=DATABASE_NAME user=USER_NAME password=PASSWORD" points.shp -skipfailures

I'm looking for it in Google, but without success.

Would anyone have any idea what is happening?

  • Most probably a dependent DLL or SO was missing. It would be helpful if you can tell what OS you are using, how you obtained/install/built the GDAL/OGR tools, and etc.
    – Ralph Tee
    May 18, 2018 at 4:15
  • I use the Ubuntu 16 and I had installed the GDAL/OGR by apt-get. Anyway, I resolved my problem purging and installing the libgdal20 again. I explained the steps below. Thank you so much for your help.
    – rmmariano
    May 23, 2018 at 22:19

1 Answer 1


I believe that the problem was in the libgdal20 library, which it had the driver dependency: _ZNK17GDALDriverManager14GetDriverCountEv

Then I had to use a purge in this library and install everything again related to GDAL/OGR. Finally the OGR has started to work.

The following commands solved my problem:

sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update

sudo apt purge libgdal20

sudo apt-get install libgdal20

sudo apt-get install gdal-bin python-gdal python3-gdal postgis

  • 1
    thanks, you saved my day
    – tomfumb
    Apr 22, 2020 at 16:38

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.