I am installing Postgis on my Debian server, following these instructions:
http://postgis.net/install/ (Ubuntu / Debian)
https://wiki.postgresql.org/wiki/Apt
However, after following the instructions it looks like I have installed PostGres (9.4), but no PostGIS.
Do I have to install something more that was omitted in the instructions?
Can I somehow add PostGIS as a PostGres Plugin / Extension?
Best Answer
I did an extensive blog post on installing PostgreSQL 9.3/PostGIS 2.1 a few months ago at http://geospatial.commons.gc.cuny.edu/2014/10/25/installing-postgresqlpostgis-on-linux-mint-17/. It's not immediately clear to me what went wrong in your case, because you haven't really described what you did. In particular, the PostGIS installation instructions you link to describe compiling from source, as well as using the official repositories, and you don't say what you did. The fact that you are getting the message that
postgis.control
is missing when you tryCREATE EXTENSION postgis;
seems to imply that you have not successfully installed the PostGIS package. You could tryand see if it returns
or any other version.
If PostGIS is not in fact installed you can install from the PostgreSQL repository, which, if you have followed the directions at https://wiki.postgresql.org/wiki/Apt, is the one I believe you are using.
Note that
should also work, but I'm not which version of PostGIS it will attempt to install since you are connected to both PostgreSQL and Ubuntu repositories, and the Ubuntu repository is still only up to PostgreSQL 9.3. So there might be a dependency issue there, but I'm not going to attempt to confirm that on my system.
Once this is installed (you can confirm by looking for
/usr/share/postgresql/9.4/extension/postgis.control
, the file that showed as missing before), you can proceed by logging on to PostgreSQL with a SUPERUSER account, connecting to your database (not the postgres database, your actual data database) andNote that
fuzzystrmatch
(which is useful for the geocoder) requires thepostgresql-contrib
package.I'm glossing over a lot here, but it's possible that I haven't correctly identified the problem, so I don't want to expand on this until I know we're on the right track. Also, please refer to my blog post above for more detail.