1

What is postgres-9.4-postgis-2.1 ? what is the difference of postgres-9.4-postgis-2.1 and postgis

sudo apt-get install postgres-9.4-postgis-2.1

and

sudo apt-get install postgis

which one enable the postgis plugin of a postgres database

1 Answers1

2

The postgis package comes from Fedora/RHEL. rpm -qip on the package will report Packager: Fedora and yum info postgis reports From repo : updates. It installs PostGIS for the Fedora/RHEL-packaged PostgreSQL, which is in a package named postgresql.

The postgres-9.4-postgis-2.1 package comes from PGDG, the PostgreSQL Development Group, at http://yum.postgresql.org/ . It's an extension repository that adds access to newer PostgreSQL versions than Fedora/RHEL include for any given version. The postgis packages from that repository install PostGIS for the associated PostgreSQL release. So this package installs PostGIS 2.1 for PostgreSQL 9.4 from PGDG, for the PostgreSQL package named postgresql-9.4.

You should install the PostGIS package that corresponds to the PostgreSQL package you have installed and are using. If you have enabled PGDG packages then that's very likely the PGDG PostgreSQL, so you should install postgres-9.4-postgis-2.1.

Craig Ringer
  • 10,553
  • 9
  • 38
  • 59