Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not find PostGIS extensions ( installed in a different directory ) and $libdir/postgis-2.3 in mac os

I'm using postgres in pycharm and it can't find the postGIS extensions. It is looking for them in: /Library/PostgreSQL/9.6/share/postgresql/extension/

however, when I install PostGIS, it tells me that: PostGIS extension modules are installed in: /usr/local/share/postgresql/extension

Another issue (don't know if it is related to the first) is : could not access file "$libdir/postgis-2.3": No such file or directory

like image 532
A2maridz Avatar asked Apr 05 '17 08:04

A2maridz


People also ask

How do you check PostGIS is installed or not?

Postgis is easily installed from apt. Depending on which version of Ubuntu you are using, and which repositories you have configured, these commands will install PostGIS 1.5, or 2. x. You can find the version installed by issuing a select PostGIS_full_version(); query with psql or another tool.

How to use PostGIS in PostgreSQL?

Below are the basic steps. Once PostgreSQL is installed, launch Application Stack Builder from (Start->Programs->PostgreSQL .. ->Application Stackbuilder and pick the version of PostgreSQL you want to install PostGIS on and the version of PostGIS to install. You can upgrade from 2.


1 Answers

I noticed this issue after having upgraded from PostGIS 2.3.0 to 2.4.0. My databases were still looking for 2.3.0 libraries when the 2.4.0 were installed. The solution was to individually update the databases to look for the 2.4.0 versions:

ALTER EXTENSION postgis UPDATE;
SELECT PostGIS_full_version();

See Upgrading PostGIS section for further details

like image 122
HopeThisHelps Avatar answered Oct 16 '22 20:10

HopeThisHelps