Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For the life of me I can't find the configure flags for the Nagios Plugins. check_pgsql isn't compiling because it says it can't find the postgresql libraries, but I know exactly where they are on my server.

share|improve this question
Which distro are you running? Post the full messages when compiling check_pgsql. – quanta Nov 16 '11 at 2:27
Did you ever find a resolution to this? – ziesemer Feb 9 at 4:44

Do you have the development libraries installed, not just the runtime libraries?

On a RHEL/CentOS box, I see:

postgresql-devel.i386 : PostgreSQL development header files and libraries.
postgresql-libs.i386 : The shared libraries required for any PostgreSQL clients.

To build your own clients, you will most likely need to have postgresql-devel installed. To run it, you'll need the postgresql-libs package. Other Linuxes will have their own naming conventions if they split the runtime libraries from the development libraries, assuming you're using Linux.

share|improve this answer
+1 when you compile something that depends on another library you often need the source for that library too. if all fails you should be able to download the source of postgresql and set a /.configure flag to set the directory it looks in for the source files. – Silverfire Nov 16 '11 at 2:14
I compiled Postgresql 9 from source, and I know where the libraries are. For some reason when I go to compile the Nagios Plugins, it doesn't find them. Like I said. I can't find a configure flag to tell it where to find them. – rkalajian Nov 16 '11 at 14:32

There doesn't seem to be a flag you can pass to configure for this, but inside the script it uses a variable called PGSQL to store its hard-coded assumptions on where to find postgresql. Running configure like this let me change the path and build check_pgsql.

PGSQL=/usr/pgsql-9.3 ./configure --therestofyourflagshere
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.