Is there an end to end guide of installing PostGIS 3.0.0 on a fresh install of PostgreSQL on CentOS 8.1?
I have a .sql file with this line:
CREATE EXTENSION postgis;
I login as a postgres database user I created after installation: pgdev that I then used to create a database: db_pgdev where I want PostGIS installed,
I get this error when I execute: CREATE EXTENSION postgis
psql:./install-postgis.sql:4: ERROR: could not open extension control file "/usr/pgsql-12/share/extension/postgis.control": No such file or directory
Indeed there is no such file when I check:
These are the only files in: /usr/pgsql-12/share/extension/
plpgsql--1.0.sql
plpgsql.control
plpgsql--unpackaged--1.0.sql
The directory:
/usr/pgsql-12/share/extension/ is owned by OS user root.
sql>select version();`
PostgreSQL 12.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.3.1 20190507 (Red Hat 8.3.1-4), 64-bit
OS installed was: CentOS Linux release 8.1.1911 (Core)
(not sure why it says: Red Hat 8.3.1-4 in: select version();)
On the PostGIS site, there are no instructions to install anything like dnf install <pkg>.
I simply starts with SQL statements to enable PostGIS, as if it is already there and simply needs an extension created.
Are there instructions missing there? or something that needs to be done before CREATE EXTENSION postgis ?
When I run:
#dnf install postgis30_12
I get this error:
Error: Problem: cannot install the best candidate for the job
- nothing provides hdf5 needed by postgis30_12-3.0.1-2.rhel8.x86_64
- nothing provides xerces-c needed by postgis30_12-3.0.1-2.rhel8.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages) –
This does not seem stable (or packaged correctly) to install if the most suitable dependencies cannot be found.
I'm having little confidence in this path, there must be something missing.
Before I run the dnf command, I have the latest pgdg-redhat-repo-latest installed:
https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm