PostgreSQL error when trying to create an extension

后端 未结 15 840

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条回答
  • 2020-12-23 20:21

    The following will get you a working postgis install on Ubuntu 12.04 (Note: also tested on 13.10)

    echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/postgis.list
    wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
    sudo apt-get update
    sudo apt-get install postgresql-9.3 postgresql-9.3-postgis-2.1 postgresql-client-9.3
    sudo -u postgres psql -c 'create extension postgis;'
    

    Based on the docs at https://wiki.postgresql.org/wiki/Apt

    0 讨论(0)
  • 2020-12-23 20:21

    CentOS needs a different package for this problem. For CentOS 6, if you're using the PGDG yum repository at http://yum.pgdgrpms.org/9.3/redhat/, install the postgresql93-contrib package with the command 'yum install postgresql93-contrib.

    Update and edit as necessary for PostgreSQL 9.4.

    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题