Just installed PostgreSql and PostGIS over a brand new installation of Fedora 18. I did it this way:
sudo yum install postgresql postgresql-server postgrsql-contrib postgresql-devel pgadmin3
Once installed PostgreSql, I created the postgres user as usual.
Then, I installed PostGIS:
sudo yum install proj-devel gdal postgis
As a last step, I've created a new user (mydbuser) and a new db owned by that user:
psql -U postgres -W
CREATE DATABASE mydb OWNER mydbuser;
\q
createlang plpgsql mydb
Now, I've tried to execute the following line to use PostGIS on mydb:
psql -d mydb -U mydbuser -W -f /usr/share/pgsql/contrib/postgis-64.sql
but I get a long list of errors of the same type, this is the first line:
psql:/usr/share/pgsql/contrib/postgis-64.sql:7751: ERRORE: il tipo "geometry" non esiste
In English, the message is 'ERROR: "geometry" type does not exist'.
I've also tried to execute the code as the postgres user, but nothing changed. Any ideas?
Diego
Best Answer
The problem is in Fedora 18 itself. Default repos will install postgis 1.5 and potgresql 9.2.4, but this two versions are not compatible. This is the compatibility table:
http://trac.osgeo.org/postgis/wiki/UsersWikiPostgreSQLPostGIS
And this post seems to point out the problem:
http://postgis.17.x6.nabble.com/F18-Postgresql-9-2-x-PostGIS-1-5-x-issues-td5002414.html
...And an update ha been planned for Fedora 18 in order to resolve this issue:
https://admin.fedoraproject.org/updates/player-3.0.2-24.fc18,gdal-1.9.1-15.fc18.1,grass-6.4.2-5.fc18,geos-3.3.7-1.fc18,postgis-2.0.2-2.fc18