2

I've installed PostGIS on my Dreamhost hosted VPS and have gotten to the configure section of the process as detailed here: http://postgis.refractions.net/documentation/manual-2.0/postgis_installation.html#installation_configuration

In the last line when I run ./configure I get this error:

configure: error: could not find pg_config within the current 
path. You may need to try re-running configure with a --with-pgconfig parameter.

And I see in the 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.

However, I can't find a way to find where this file is. I know I have PostGre installed because it says so when I run this:

aptitude show postgresql | grep State

coming back with

State: installed

But I don't know where to go from here. Any help is appreciated. Thanks!

Levon
  • 138,105
  • 33
  • 200
  • 191
user1452440
  • 31
  • 1
  • 3

1 Answers1

1

You need to also install the "dev" package for PostgreSQL. For example, with Debian 6.0 (squeeze) this package is called postgresql-server-dev-8.4. It will give you pg_config to configure PostGIS.

Look here for simple install instructions for various versions of PostGIS on various Linux distros.

Mike T
  • 41,085
  • 18
  • 152
  • 203
  • Thank you! That was so much simpler than "easy" package and/or graphical installs – user1452440 Jun 13 '12 at 18:47
  • And, of course, the moment I say that and try a check it gives me an error. `WARNING: configure was unable to find CUnit which is required for unit testing. In order to enable unit testing, you must install CUnit and then re-run configure.` Trying to find info on CUnit on the PostGIS site but not finding it... – user1452440 Jun 13 '12 at 18:57
  • And this error as well `Something went wrong during db initialization (core module). For details, check /tmp/pgis_reg/regress_log dropdb: could not connect to database postgres: FATAL: Ident authentication failed for user "username" make[1]: *** [check] Error 1 make[1]: Leaving directory /home/username/postgis-2.0.0/regress' make: *** [check] Error 1'` – user1452440 Jun 13 '12 at 19:00
  • Install the package `libcunit1-dev` for your first issue. To do the tests, you need to add your username as a PostgreSQL user too, you can do this in pgAdminIII. – Mike T Jun 15 '12 at 00:24