Hello.
When I did docker-compose run import-osm after docker-compose up -d postgres
, I got error:
SQL Error: pq: could not access file "$libdir/postgis-2.3": No such file or directory in query SELECT AddGeometryColumn('import', 'osm_island_polygon', 'geometry', '3857', 'GEOMETRY', 2);
I presume that it's because of https://github.com/openmaptiles/postgis/blob/v2.9/Dockerfile#L65.
If so, can we upgrade to postgis 2.4.1? https://github.com/postgis/postgis/tree/2.4.1
Thanks!
Probably we can upgrade postgis, but I'm not sure how it's related to your bug (postgis should be installed correctly in docker images).
@stirringhalo What do you think about upgrading postgis?
@edpop maybe the postgres container is not up and docker-compose run import-osm tries to connect to your local postgresql cluster ?
If yes, this bug probably means your postgis is broken, what gives the next command ?
psql -d postgres -c 'select postgis_version()'
Usually it's due to an upgraded package on your system which has not been upgraded in your database properly. For example If PostGIS 2.4 have replaced a PostGIS 2.3 package you need to upgrade the extension like this :
psql -d postgres -c "alter extension postgis update to "2.4";
I am trying to upgrade postgis from 2.5 to 3 on my database but getting error that 2.5 doesn't exist
my_db=# SELECT postgis_extensions_upgrade();
WARNING: unpackaging raster
WARNING: PostGIS Raster functionality has been unpackaged
HINT: type `SELECT postgis_extensions_upgrade(); to finish the upgrade. After upgrading, if you want to drop raster, run: DROP EXTENSION postgis_raster;
ERROR: could not access file "$libdir/postgis-2.5": No such file or directory
CONTEXT: PL/pgSQL function _postgis_drop_function_if_needed(text,text) line 6 at FOR over SELECT rows
SQL statement "ALTER EXTENSION postgis UPDATE TO "3.0.0";"
PL/pgSQL function postgis_extensions_upgrade() line 22 at EXECUTE
I solve this
pg_dump: [archiver (bd)] la consulta fall贸: ERROR: could not access file "$libdir/postgis-2.5": No such file or directory
with s-link
:/usr/lib/postgresql/10/lib# ln -s postgis-3.so postgis-2.5.so
Thanks
Most helpful comment
I am trying to upgrade postgis from 2.5 to 3 on my database but getting error that 2.5 doesn't exist