Install Error - Centos7, Postgres 16, PostGIS 3.4.2 - No extension file found

Russell Mercer rmercer at getspatial.com
Thu Mar 21 02:20:41 PDT 2024


Hi,

I am trying to compile and install PostGIS from source on a Centos7 
server.  Host doesn't maintain current version through apt install, so 
need to install this way.

I installed Postgres 16.1 and have that working with no issues.

I have installed the following dependencies:

Geos 3.12.1
Sqlite3
Proj 9.4.0
json-c 0.17
googletest
GDAL 3.7.2
protobuf 4.0.x
protobuf-c 1.4.0
gmp 6.3.0
mpfr 4.2.1
boost 1.83.0
CGAL 5.6 headers
SFCGAL 1.5.0

Then run the following commands to install PostGIS 3.4.2
cd ~/src
wget https://download.osgeo.org/postgis/source/postgis-3.4.2.tar.gz
tar zvxf postgis-3.4.2.tar.gz
cd postgis-3.4.2/
./configure --with-pgconfig=$PGHOME/bin/pg_config \
             --with-gdalconfig=$PGHOME/bin/gdal-config \
             --with-geosconfig=$PGHOME/bin/geos-config \
             --with-projdir=$PGHOME \
             --with-jsondir=$PGHOME
make -j9
make install

It appeared that it finished properly.  When I enter Postgres and try to 
CREATE EXTENSION, I receive the following error:

ERROR:  extension "postgis" is not available
DETAIL:  Could not open extension control file 
"/home/gspostgres/apps/psql/share/extension/postgis.control": No such 
file or directory.
HINT:  The extension must first be installed on the system where 
PostgreSQL is running.

I am not sure if I have a dependency missing, or if there was actually 
something wrong with the compile.  I would really appreciate any tips 
people may have both to get this working, and also if necessary, to 
uninstall this and start over if need be.

Many thanks in advance,

Russell




More information about the postgis-users mailing list