1

I am a student and to learn more about PostGIS. I installed it to my Raspberry Pi, so that I can remotely access it via my laptop. The installation worked with the exception of the raster module.

When I execute CREATE EXTENSION postgis_raster; I get the following Output:

SQL-ERROR [58P01]: ERROR: could not open extension control file 
"/usr/share/postgresql/11/extension/postgis_raster.control": No such file or directory

This was rather unexpected since all the other extensions e.g. postgis_topology or postgis_sfcgal worked fine. The file is indeed not in the directory.

Here is a quick overview:

OS = Raspberry Pi OS
POSTGIS= 2.5.1 r17027
PGSQL= 110
GEOS= 3.7.1-CAPI-1.11.1 27a5e771
SFCGAL= 1.3.6
PROJ= Rel. 5.2.0
GDAL= GDAL 2.4.0

I enabled all the GDAL drivers SELECT short_name FROM ST_GDALDrivers();returns 144 drivers that are enabled. Also raster2pgsql is installed.

Am I missing something here? From what I understand since 2.0 ships with the raster extension disabled, how can I activate it?

  • Welcome to Geographic Information Systems! Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short tour for more about how the site works. – Ian Turton Jul 10 at 9:20
  • can you use the edit button to add details of exactly how you installed postgis please – Ian Turton Jul 10 at 9:21
1

I had the same issue. In my case, I installed PostgreSQL and PostGIS from Debian 9 repositories. The downside of Debian is that it is slow to approve the latest versions of packages and installed PostgreSQL 11.7 and PostGIS 2.5.

All of the extensions installed nicely except the raster extension. It turns out that PostGIS 2 installs the raster extension as part of the "CREATE EXTENSION postgis;" PostGIS 3 installs it separately.

I see you installed PostGIS 2.5. Both you and I used a script meant for PostGIS 3. But the only difference compared to one meant for PostGIS 2 is the unneeded "CREATE EXTENSION postgis_raster;" command.

So, we both have PostGIS completely installed!!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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