LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Help needed with Nagios installation (http://www.linuxquestions.org/questions/slackware-14/help-needed-with-nagios-installation-892522/)

chicken76 07-19-2011 10:23 AM

Help needed with Nagios installation
 
I'm trying to install Nagios on a machine running Slackware-12.2 and keep getting this error:

Code:

*** GD, PNG, and/or JPEG libraries could not be located... *********

Boutell's GD library is required to compile the statusmap, trends
and histogram CGIs.  Get it from http://www.boutell.com/gd/, compile
it, and use the --with-gd-lib and --with-gd-inc arguments to specify
the locations of the GD library and include files.

NOTE: In addition to the gd-devel library, you'll also need to make
      sure you have the png-devel and jpeg-devel libraries installed
      on your system.

NOTE: After you install the necessary libraries on your system:
      1. Make sure /etc/ld.so.conf has an entry for the directory in
        which the GD, PNG, and JPEG libraries are installed.
      2. Run 'ldconfig' to update the run-time linker options.
      3. Run 'make clean' in the Nagios distribution to clean out
        any old references to your previous compile.
      4. Rerun the configure script.

I have installed the packages:
  • gd-2.0.35-i486-2
  • libjpeg-6b-i486-5
  • libpng-1.2.44-i486-1_slack12.2
Ran ldconfig, supplied the ./configure script with the --with-gd-lib and --with-gd-inc arguments, to no avail.
Somehow I have the feeling I'm missing some libraries, but can't really "put my finger" on them.

sweetfa 07-19-2011 03:32 PM

Help needed with Nagios installation
 
What is the full command line you are invoking configure with?

chicken76 07-19-2011 03:38 PM

I've tried with no arguments and also:
Code:

./configure --with-command-group=nagcmd --with-gd-lib=/usr/lib --with-gd-inc=/usr/include
Still the same error appears and every graphical cgi in Nagios is missing.

sweetfa 07-20-2011 12:10 AM

Help needed with Nagios Installation
 
I presume you have checked that /usr/lib/libgd.so.2 exists.

Are you running in a 32 or 64 bit environment?

And have you tried running configure with the full path to the library file instead of just the directory. I haven't been able to find my installation command line and it was such a long time ago.

chicken76 07-20-2011 02:37 AM

Quote:

Originally Posted by sweetfa (Post 4419764)
I presume you have checked that /usr/lib/libgd.so.2 exists.

Yes, it's present.

Quote:

Originally Posted by sweetfa (Post 4419764)
Are you running in a 32 or 64 bit environment?

It's Slackware 12.2, so it's 32 bit.

Quote:

Originally Posted by sweetfa (Post 4419764)
And have you tried running configure with the full path to the library file instead of just the directory. I haven't been able to find my installation command line and it was such a long time ago.

Tried it and no change.

Here are the lines preceding the error in my first post:
Code:

checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... no
checking for gdImagePng in -lgd (order 3)... no
checking for gdImagePng in -lgd (order 4)... no

Do you know if png-devel and jpeg-devel are the same thing as libpng and libjpeg?

Diantre 07-20-2011 03:26 AM

Quote:

Originally Posted by chicken76 (Post 4419869)
Do you know if png-devel and jpeg-devel are the same thing as libpng and libjpeg?

The "devel" packages in other linux distributions usually contain C/C++ headers that go in /usr/include. Slackware packages provide both the binaries/libraries and headers, so yes, libpng and libjpeg already have the "devel" files.

A question regarding your problem. Do you know which library isn't found? Or is it the three of them, libpng, libjpeg and gd? I mention this because you said you tried this command:

Code:

./configure --with-command-group=nagcmd --with-gd-lib=/usr/lib --with-gd-inc=/usr/include
Maybe if you pass to configure similar options for both libjpeg and libpng?

chicken76 07-20-2011 05:26 AM

Quote:

Originally Posted by Diantre (Post 4419896)
A question regarding your problem. Do you know which library isn't found? Or is it the three of them, libpng, libjpeg and gd?

That's the thing, whether I supply those arguments or not, the result is the same (no detailed information on what was found and what wasn't). And since I don't know C, I have no idea how to check this other than looking in config.log for any failures.
A couple of things caught my attention:
Code:

configure:6441: checking for main in -liconv
configure:6470: gcc -o conftest -g -O2  conftest.c -liconv  >&5
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld: cannot find -liconv
collect2: ld returned 1 exit status

and
Code:

configure:6502: checking for gdImagePng in -lgd (order 1)
configure:6535: gcc -o conftest -g -O2  conftest.c -lgd -lttf -lpng -ljpeg -lz -lm  >&5
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld: cannot find -lttf
collect2: ld returned 1 exit status

Googling for liconv turned out some interesting results. It seems gd fails when liconv or libconv is not found. I see Slackware does not have this library in a package, but sources are available for libiconv at http://www.gnu.org/s/libiconv/
Do you think it's worth compiling and installing it?
However, searching for lttf did not turn out anything useful. Do you have any idea what it might be?

Quote:

Originally Posted by Diantre (Post 4419896)
Maybe if you pass to configure similar options for both libjpeg and libpng?

I've checked the configure script and it does not have such options.

chicken76 07-20-2011 05:56 AM

UPDATE:

After installing the following packages, the configure script partially passed the GD test:
  • libXpm
  • libX11
  • fontconfig
  • libxcb
  • libXau
  • libXdmcp
Here's an excerpt from config.log:
Code:

configure:6502: checking for gdImagePng in -lgd (order 1)
configure:6535: gcc -o conftest -g -O2  conftest.c -lgd -lttf -lpng -ljpeg -lz -lm  >&5
/usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld: cannot find -lttf
collect2: ld returned 1 exit status
configure:6568: result: no
configure:6575: checking for gdImagePng in -lgd (order 2)
configure:6608: gcc -o conftest -g -O2  conftest.c -lgd  -lpng -ljpeg -lz -lm  >&5
configure:6614: $? = 0
configure:6634: result: yes
configure:6839: checking for gdImageCreateTrueColor in -lgd
configure:6874: gcc -o conftest -g -O2  conftest.c -lgd  >&5
configure:6880: $? = 0
configure:6898: result: yes


xj25vm 11-12-2013 09:51 AM

Quote:

After installing the following packages, the configure script partially passed the GD test:

libXpm
libX11
fontconfig
libxcb
libXau
libXdmcp
This is an old thread - but this topic is still current. Anybody trying to install Nagios on Slackware 14.1 without X will hit the same error message. However, unlike the case of the OP, installing the suggested packages will go past the error completely. Thanks for that!


All times are GMT -5. The time now is 01:39 AM.