[GIS] Resolving postgis.control location error on CentOS 7

centospostgispostgresql

Yum installed PostgreSQL 10 and PostGIS 2.0 on a CentOS 7 host. Got this error while creating the postgis extension on a DB:

could not open extension control file
"/usr/pgsql-10/share/extension/postgis.control": No such file or
directory

The postgis.control file on the Centos 7 is actually on /usr/share/pgsql/extension/postgis.control

How should I resolve this? Will creating a soft link be enough?

Best Answer

I have both epel and pgdg10 repo enabled. Disabling the eprl repo before installing postgis will install the proper postgis rpms for postgresql-10.