2

i installed postgres on a new vps and then i installed postgis, but trying to create a postgis extension i always get this error:

    create extension postgis;
ERROR:  could not load library "/usr/lib/postgresql/10/lib/rtpostgis-2.4.so": /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20)

i have no idea how to solve it.

i also tried to install openssl and libssl-dev but didn't help

edit: i am using 18.04.4 LTS ubuntu

i install issuing:

sudo apt install postgresql postgresql-contrib
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install postgis
5
  • 1
    Which linux distro are you using? Also, could you add how you've installed postgis? Commented Feb 22, 2020 at 17:19
  • 1
    I can't reproduce this, after running those commands on 18.04, sudo -u postgres psql -c "CREATE EXTENSION postgis" works fine. Commented Feb 22, 2020 at 23:01
  • @jjanes I believe that the package postgis does not place the libraries in the directories that postgres 10 looks in, while postgresql-10-postgis-3 specifically copies the libraries to the postgres 10 directories. At least I remember having this problem many times and being able to solve it using postgresql-10-postgis-3 (for v10). Commented Feb 23, 2020 at 10:26
  • @91DarioDev any luck with the extension? Commented Feb 23, 2020 at 10:26
  • 1
    @JimJones, well it did work for me in v10. I'm guessing he has some other packages installed or removed or broken or misconfigured. For example, why should loading this to PostgreSQL even be touching libmysqlclient.so.20? But anyway, not using the repository flagged as "unstable" to get the packages might be a good idea for him. Commented Feb 23, 2020 at 14:00

1 Answer 1

2

Issue with Ubuntu 18.04

For missing OpenSSL 1.1.1 on Ubuntu 18.04 take a look at this answer. You might need to download the .deb file and install it manually.

PostgreSQL 10 and PostGIS 2.4

In this article a similar error is solved by creating a symbolic link to the rtpostgis library available in the system, so that you can trick PostGIS 2.4 into thinking that the file exists, e.g. rtpostgis-2.5.so to rtpostgis-2.4.so:

$ ln -s rtpostgis-2.4.so rtpostgis-2.5.so

PostgreSQL 10 and PostGIS 3

To install PostGIS 3 (newer version) in a PostgreSQL 10 environment try:

sudo apt-get install postgresql-10-postgis-3

After that you will have the required libraries to perform CREATE EXTENSION postgis.

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

2 Comments

To nowadays, sudo apt install postgresql-12-postgis-3
We have postgresql-10-postgis-2.4 (this is available on Ubuntu 18.04) installed and are still running into this issue.

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.