Just installed OpenBSD 3.9 on a new server to replace our existing Nagios server. I have Nagios running but had problems getting Nagios the status map and trends graphs working. Between 3.8 and 3.9, OpenBSD has moved from gd-1.8 to gd-2.0. And now Nagios won’t recognize the 2.0 library.
I’ve tried installing gd-1.8 from the 3.8 packages but apparently enough has changed on its dependencies to prevent that. I’ve also tried making symlinks matching the old library names, but to no avail. It could be that Nagios is calling some methods that no longer exist in the libraries. But without knowing what Nagios is looking for, it makes it hard to come up with a solution.
Any thoughts on how I can get around this issue? Although it’s not necessary, it would still be nice to be able to create trend and availability graphs from Nagios again.
Thanks in advance.
./configure
make all
make install the nagios source again. Pay attention to the output of ./configure. It just might complain about GD.
My ‘configure’ command is:
./configure --with-gd-inc=/usr/local/include --with-gd-lib=/usr/local/lib
The relevant output from this is as follows:
…
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
*** 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 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.
NOTE: If you can’t get the configure script to recognize the GD libs
on your system, get over it and move on to other things. The
CGIs that use the GD libs are just a small part of the entire
Nagios package. Get everything else working first and then
revisit the problem. Make sure to check the nagios-users
mailing list archives for possible solutions to GD library
problems when you resume your troubleshooting.
…
There is a header file at /usr/local/include/gd.h and libraries at /usr/local/lib/libgd.a and /usr/local/lib/libgd.so.20.33 that ‘configure’ should see, but it doesn’t. It was implied but not stated, this works fine on OpenBSD 3.8 with gd-1.8. This is on OpenBSD with gd-2.0. The rest of Nagios compiles and installs just fine. I’m only now going back to get the status map and trend graphs working.
libjpeg-devel.i386
libjpeg.i386
libtiff.i386
libtiff-devel.i386
libpng.i386
libpng-devel.i386
That is what I have installed.
So try them.
on OpenBSD you have to install X11.
Then you are able to install GD package
To install X11, you have to choose it when you install OpenBSD, or you can do it after : unzip the tgz
In 4.1 (i386):
copy from the cdrom /4.1/i386/xbase41.tgz to /
then: tar zxvf /xbase41.tgz