0

I use Centos 7 and Postgresql 12. I installed already PostGIS and created successfully its extension. I'm now tring to install semver extension with create extension semver and get following error:

ERROR: incompatible library »/usr/pgsql-12/lib/semver.so«: version does not match

According to developer this version should work with my Postgresql 12. Why am i getting this error?

Thanks!

5
  • 1
    How did you install semver? It sounds like your .so file was built against an earlier version of Postgres. Commented Feb 27, 2020 at 22:23
  • because i want to compare software versions in my table. But it's the last version... Commented Feb 27, 2020 at 22:24
  • But where did you get the .so file? Even for the same version of semver (e.g. 0.21.0), you need different .so files for Postgres 12, 11, 10, etc., and it sounds like yours was not built for Postgres 12. Commented Feb 27, 2020 at 22:42
  • i installed it via yum install pg-semver and it installs "pg-semver-0.5.0-2.el7.x86_64" Commented Feb 27, 2020 at 22:53
  • i had some troubles while installing semver, because yum puts the .so file in a different lib folder, where postgresql couldn't find it. that's why i had to manually move the semver.so file to postgresql's lib folder for extensions. (see the issue here: stackoverflow.com/questions/60395560/… ) Commented Feb 27, 2020 at 22:55

1 Answer 1

1

An extension's .so binaries are specific to a major release of Postgres.

If you're installing the extension through yum, there would typically be a different package for each Postgres version. For example, if you installed Postgres 12 using the postgresql12-server package, then you would install PostGIS 3.0 using the postgis30_12 package.

If the package name is just pg-semver, without a Postgres version number, then it's probably intended for your distribution's default postgresql-server package. In CentOS 7, this appears to be Postgres 9.2, so these files won't work on a Postgres 12 server.

If you can't find a PG12-specific package, you'll need to build it yourself, using the instructions here.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.