PostgreSQL error when trying to create an extension

后端 未结 15 924

ERROR: could not open extension control file \"/usr/share/postgresql/9.1/extension/postgis.control\": No such file or directory

Is what I get when I tr

15条回答
  •  旧时难觅i
    2020-12-23 20:22

    I had my worst nightmare while installing Postgis 2.X on SLES 12 SP1. which doesnt have compatible package in zypper repo

    Here is how is resolved it on my Postgres server instance running 9.4.X

    Prerequsite packages which i have installed prior to PostGis based on the errors

    Proj 4 Download source cold, Build --> make install
    install Gdal andjibson by adding zypper repo zypper addrepo http://download.opensuse.org/repositories/Application:Geo/SLE_12_SP1_Backports/Application:Geo.repo
    zypper install gdal gdal-devel libjson-c-devel libjson
    

    Installing Postgis

    Download postgis source code (http://download.osgeo.org/postgis/source/postgis-2.3.0rc1.tar.gz)
    
    Go to Postgis folder 
    ./configure --with-pgconfig=/usr/lib/postgresql94/bin/pg_config --with-geosconfig=/usr/local/bin/geos-config 
    make 
    make install
    

    now if you goto postgress DB and create extension postgis; it will work

    Important while configuring you should specify pg-config path and geosconfig path and You SHOULD NOT include "without Raster" as RASTER plays main role in creating the postgis extension

提交回复
热议问题