I've the following error in a Django application using PostGIS.
The app was recently working fine. Is this related to a change on the system?

OSError: /usr/gdal32/lib/libgdal.so.28: undefined symbol: proj_crs_get_datum_ensemble

Via psql:

db_name=> SELECT PostGIS_Full_Version();
postgis_full_version
-------------------
 POSTGIS="2.5.5" [EXTENSION] PGSQL="110" GEOS="3.8.1-CAPI-1.13.3" SFCGAL="1.3.1" PROJ="Rel. 7.1.1, September 1st, 2020" GDAL="GDAL 3.1.3, released 2020/09/01"
 LIBXML="2.9.1" LIBJSON="0.11" LIBPROTOBUF="1.0.2" TOPOLOGY RASTER
  • sean replied to this.

    ppo Hi Pascal, we installed some packages related to gdal yesterday but this was not expected.

    I've uninstalled those on your server, can you let me know if that solved your problem?

    Thanks @sean it's working again now.
    Can you please do it also on opal9; as I'll install the same kind of app today or tomorrow.

    • sean replied to this.

      I am seeing this same thing on opal7 today. Any help? sean

      OSError: /usr/gdal32/lib/libgdal.so.28: undefined symbol: proj_crs_get_datum_ensemble

        23 days later

        I'm still getting this error on Opal1. I'm running in python2.7

        Traceback (most recent call last):
          File "manage.py", line 9, in <module>
            execute_from_command_line(sys.argv)
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
            utility.execute()
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
            django.setup()
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
            apps.populate(settings.INSTALLED_APPS)
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
            app_config.import_models(all_models)
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
            self.models_module = import_module(models_module_name)
          File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
            __import__(name)
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/contrib/auth/models.py", line 40, in <module>
            class Permission(models.Model):
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/db/models/base.py", line 122, in __new__
            new_class.add_to_class('_meta', Options(meta, **kwargs))
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/db/models/base.py", line 297, in add_to_class
            value.contribute_to_class(cls, name)
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/db/models/options.py", line 166, in contribute_to_class
            self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/db/__init__.py", line 40, in __getattr__
            return getattr(connections[DEFAULT_DB_ALIAS], item)
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/db/utils.py", line 242, in __getitem__
            backend = load_backend(db['ENGINE'])
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/db/utils.py", line 108, in load_backend
            return import_module('%s.base' % backend_name)
          File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
            __import__(name)
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/base.py", line 4, in <module>
            from django.contrib.gis.db.backends.postgis.introspection import PostGISIntrospection
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/introspection.py", line 2, in <module>
            from django.contrib.gis.gdal import OGRGeomType
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/contrib/gis/gdal/__init__.py", line 46, in <module>
            from django.contrib.gis.gdal.driver import Driver  # NOQA
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/contrib/gis/gdal/driver.py", line 5, in <module>
            from django.contrib.gis.gdal.prototypes import ds as capi
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/contrib/gis/gdal/prototypes/ds.py", line 8, in <module>
            from django.contrib.gis.gdal.libgdal import lgdal
          File "/home/futuregreen/.virtualenvs/sup/lib/python2.7/site-packages/django/contrib/gis/gdal/libgdal.py", line 48, in <module>
            lgdal = CDLL(lib_path)
          File "/usr/lib64/python2.7/ctypes/__init__.py", line 360, in __init__
            self._handle = _dlopen(self._name, mode)
        OSError: /usr/gdal32/lib/libgdal.so.28: undefined symbol: proj_crs_get_datum_ensemble
        • sean replied to this.

          Thanks, but I am still getting the error. Is there anything I need to do on my end?

          • sean replied to this.

            dmeehan No, that was my fault. The fix was still pending, but it's done now. If the error persists then please restart your app.

            8 months later

            have trying to sort this error but haven't been able kindly help
            OSError: /lib/libgdal.so.28: undefined symbol: proj_crs_get_datum_ensemble

            • sean replied to this.
              Mastodon