[postgis-users] Problem enabling postgis (Mac OS)

António Rodrigues n.marxco at gmail.com
Mon Aug 13 07:57:19 PDT 2012


Thanks for the reply.

I completely removed postgresql. Re-installed from PostgreSQL-9.1.4-1.dmg
and PostGIS-2.0.1-1.dmg. Now there are no traces of postgis
in /usr/local/pgsql-9.1. Is this normal?

One other thing, from what I read and sticking for now to the advice of
enabling postgis using extensions, shouldn't the postgis sql stuff be here
-> /usr/local/pgsql-9.1/share/extension, so that in pgadmin, choosing new,
postgis would show up as an option?

Sorry if I'm missing something obvious.
Thanks,
Pedro

On Sun, Aug 12, 2012 at 4:51 AM, William Kyngesburye
<woklist at kyngchaos.com>wrote:

> On Aug 11, 2012, at 8:35 PM, António Rodrigues wrote:
>
> > Hi list,
> >
> > I'm having problems enabling postgis on a mac running Mountain Lion.
> Most likely this is due to my absolute lack of experience with postgresql,
> but I've read the documentation, searched the web and so far, no luck.
> >
> > This is what I've done
> >
> > Installed GDAL_Complete-1.9.dmg, PostgreSQL-9.1.4-1.dmg and
> PostGIS-2.0.1-1.dmg from kyngchaos (in this order)
> >
> > During installation, I was not prompted for a postgres password, hence I
> had problems when connecting as user (role) postgres.
>
> This is normal - no password is set for the postgres role on installation.
>  Local connections to postgres are all allowed without a password, and no
> external connections are allowed at all, in the default configuration
> (pg_hba.conf), so it should work, but the readme suggests setting a
> password (especially if you install it on a shared computer).
>
> > In pgadmin I created a new role as superuser.
> >
> > ----------
> > From PostGIS documentation, I tried (in the psql console plugin…
> >
> > (p.14 in PostGIS 2.0.0 Manual)
> >
> > createdb db1
> > createlang plpgsql db1
> > psql -d db1 -f postgis.sql
> > psql -d db1 -f spatial_ref_sys.sql
> > psql -d db1 -f postgis_comments.sql
> > psql -d db1 -f rtpostgis.sql
> > psql -d db1 -f raster_comments.sql
> > psql -d db1 -f topology/topology.sql
> > psql -d db1 -f topology/topology_comments.sql
> > psql -d db1 -f legacy.sql
> >
> > Nothing new: no postgis functions...
> >
> > Then Using the psql console plugin I typed:
> > (p. 15PostGIS 2.0.0 Manual)
> > psql -d db -c "CREATE EXTENSION postgis;"
> > psql -d db -c "CREATE EXTENSION postgis_topology;"
> >
> > Again no good.
>
> The problem may be that without any user flag, psql uses your system login
> name to connect to postgres.  If you don't setup your login name as a
> postgres role, you won't connect.  You need to add to your psql connection:
>
> -U postgres
>
> or other role with full permissions on the DB (I don't think you need
> superuser perms, only the superfluous createlang step in the old method
> did).
>
> note: stick with the extension method - easier to install and upgrade.
>
> > Then I pasted the code in from postgis.sql (from
> \usr\…contrib\postgis2.0 directly in a sql window in pgadmin…
> >
> > I got the error message: "ERROR:  could not access file
> "$libdir/postgis-2.0": No such file or directory"
> > ----------
> >
> > I am aware this is a newby kind of problem, and I apologize for that,
> but some help would be really really great.
> > Thanks,
> > Pedro
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> Theory of the Universe
>
> There is a theory which states that if ever anyone discovers exactly what
> the universe is for and why it is here, it will instantly disappear and be
> replaced by something even more bizarrely inexplicable.  There is another
> theory which states that this has already happened.
>
> -Hitchhiker's Guide to the Galaxy 2nd season intro
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120813/2650b3f2/attachment.html>


More information about the postgis-users mailing list