I installed PostgreSQL 12 and PostGIS on a new server. I want to use this environment as source for different projects and services.

When I try to import CSV files in the database using psql, I get an error when trying to execute the following:

UPDATE bet_srk_2020 SET geom = 
AISTrajectPositionLatitude) ,4326);


FATAL:  failed to load summary "/usr/lib/postgresql/12/lib/bitcode/postgis-3.index.bc": Invalid summary version 7, 1, 2, 3 or 4 expected
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.

I tried to find information about this error but can't really find solutions.

I am able to add data to the databases if I use the QGIS Toolbox feature: Export to PostgreSQL

Is this simply a syntax error in my request to the server? Or is there a problem with the installation of PostGIS?

EDIT: 2020 10 30:

Based on CL. comments I investigated the problem in my installation: I use a Ubuntu setup with the apt.postgresql.org repository.

For some reason Postgresql-12 was installed from the postgresql.org repository and postGIS 3.0 was installed from the standard Ubuntu repository. After installing postGIS from the same repo as postgreSQL the problem was solved and server operation is back to normal.

  • Looks like an installation problem. Did you compile it yourself, or use some package? – CL. Oct 29 at 12:01
  • Use packages in apt (Ubuntu) but i did use a different repository than Ubuntu’s own – CaptainAhab Oct 29 at 12:22
  • What's wrong with the official repo? – CL. Oct 29 at 12:27
  • @CL. Followed guide that applied apt.postgresql.org – CaptainAhab Oct 29 at 12:28
  • Did you mix PostgreSQL and PostGIS from different repos? Do you really need something newer than what is in the Ubuntu repo? – CL. Oct 29 at 15:07

Problem was caused due to installation of postgreSQL-12 and postGIS from different repositories in Ubuntu-server.
the postgresql-12 was installed via the apt.postgresql.org repo.
the postGIS was installed via the standard Ubuntu repo.

After postGIS was installed via the same repo the errors no longer occurred

| 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.