When I am in my postgres db and tried to create an extension for my db, I get this error
ERROR: could not open extension control file "/usr/share/postgresql/9.5/extension/postgis.control": No such file or directory
I know there are so many posts out there with this error and solutions and I tried them all too. Found so much in stackoverflow but none of them worked.
I realized in my postgresql
directory there are 9.2
, 9.3
, 9.4
, 9.5
, 9.6
,
I went into the directory in the error and I realized there is really no postgis.control
inside 9.5
I checked my psql version and showed 9.6.1
I went into 9.6
folder and I DO see a postgis.control
in it.
I want to changed the installation directory so when i run
create extension postgis
it would go
"/usr/share/postgresql/9.6/extension/postgis.control"
instead of
"/usr/share/postgresql/9.5/extension/postgis.control"
Can someone please give me a hand?
Thanks in advance.
P.S. Using Ubuntu 14.04 and also have Ubuntu 16.04 as desktop which I haven't try to install postgis yet
The best place to get the latest binaries for both PostgreSQL and PostGIS is the PostgreSQL Yum repository Refer to Installing PostGIS 3.1 and PostgreSQL 13 on CentOS 8 repository RPM for your distribution, download and install it.
PostGIS is an open source, freely available spatial database extender for the PostgreSQL Database Management System (a.k.a DBMS). So PostgreSQL (a.k.a. Postgres) is THE database and PostGIS is like an add-on to that database. The latest release version of PostGIS now comes packaged with PostgreSQL.
You should use the following command:
sudo apt-get install postgresql-9.6-postgis-scripts
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With