PostgreSQL 12 and PostGIS 3.0.1: ERROR: could not access file "$libdir/postgis-3": No such file or directory on Linux

I have Linux Mint 19.2 where I installed the newest PostgreSQL 12 using:

sudo apt-get install postgresql

Similarly, I installed the newest Postgis 3.0.1 using:

sudo apt-get install postgis

I setup postgres account and everything and wanted to create an extension of PostGIS. I thus had to install also postgresql-12-postgis-3-scripts, which added postgis.control into PostgreSQL installation.

I then connected to my postgres account, created and initialised a test database and attempted to create extension postgis. The answer was:

ERROR: could not access file "$libdir/postgis-3": No such file or directory

Both PostgreSQL and PostGIS were fresh installs. I have no broken dependencies or old PostgreSQL fragments on my computer... What am I missing?


  • You were close. Try installing postgis in your PostgreSQL 12 like this:

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

    After that you'll be able to successfully run