Thread: Problem installing PostGIS because of pg_config

Problem installing PostGIS because of pg_config

From
Bob Holmstrom
Date:
Total novice here!  I am doing a neighborhood history mapping project and want to use a MapBox template.  In order to do so I need to "have PostgreSQL installed & running with a PostGIS database setup within it."

I have an iMac model 8,1 running Snow Leopard 10.6.8

I have downloaded and installed PostgreSQL 9.1  - The install ran as per the example shown in the www.enterprisedb.com/resources-community/pginst-guide 

I did not install any of the StackBuilder options as offered at the end of the install.

I downloaded PostGIS after installing the GEOS and PROJ4 frameworks as per the osm2pgsql installer instructions.  I also downloaded and installed XCODE in order to get access to a c++ compiler.

./configure now runs from the PostGIS directory and generates the following error message >  configure: error: could not find pg_config within the current path. You may need to try re-running configure with a --with-pgconfig parameter.

The PostGIS install instructions say:  --with-pgconfig=FILE

PostgreSQL provides a utility called pg_config to enable extensions like PostGIS to locate the PostgreSQL installation directory. Use this parameter (--with-pgconfig=/path/to/pg_config) to manually specify a particular PostgreSQL installation that PostGIS will build against.

I did not find pg_config with finder or spotlight.  I did find it at /Library/PostgreSQL/9.1/bin      it does not seem to have an extension


./configure--with-pgconfig=/Library/PostgreSQL/9.1/bin

and

./configure--with-pgconfig=/Library/PostgreSQL/9.1/bin/pg_config

both generate the error message "No such file or directory"

Can anyone help this novice out? I looked through PostgreSQL site and the only hint I found was something about "dev" extensions being needed.

Bob

Re: Problem installing PostGIS because of pg_config

From
Tom Lane
Date:
Bob Holmstrom <holmstro@gmail.com> writes:
> ./configure--with-pgconfig=/Library/PostgreSQL/9.1/bin/pg_config
> both generate the error message "No such file or directory"

If you really typed it like that, you need a space:

./configure --with-pgconfig=/Library/PostgreSQL/9.1/bin/pg_config

            regards, tom lane