4

I have Ubuntu Server (16.04) with installed PostgreSQL (9.5) and PostGIS (2.2). I have also installed GDAL 2.1 (from ubuntugis/ppa) and I need PostGIS to use it. But when I check:

SELECT PostGIS_GDAL_Version();

it writes:

GDAL 1.11.3, released 2015/09/16

So, it uses the obsolete version of GDAL that came from somewhere else.

How can I point PostGIS to the proper version of GDAL? Is it a question of environment variables or PostGIS configuration?

2 Answers 2

3

GDAL is a compile time dependency for PostGIS. It you want to change the version you must build PostGIS by yourself https://postgis.net/docs/manual-2.2/postgis_installation.html

--with-gdalconfig=FILE

GDAL, a required library, provides functionality needed for raster support gdal-config to enable software installations to locate the GDAL installation directory. Use this parameter (--with-gdalconfig=/path/to/gdal-config) to manually specify a particular GDAL installation that PostGIS will build against.

2

My best advice is to install everything from ubuntugis unstable.

For xenial, you currently get postgis 2.4.2 for postgresql 9.5 and GDAL 2.2.2.

The versions you have installed are from the main Ubuntu repo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.