Gd could not be found


#1

Hey guys,

I’ve spent 4 hours now tweaking configure and it still couldn’t find my GD, PNG and/or JPG. Please help.

This is what I get when running

./configure --with-gd-lib=/usr/local --with-gd-inc=/usr/local

*** 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.

.
.
.

then here are the files related to the library

for GD:

-r–r--r-- 1 root wheel 264832 Jan 27 12:42 /usr/local/lib/libgd.a
-rwxr-xr-x 1 root wheel 747 Jan 27 12:19 /usr/local/lib/libgd.la
lrwxr-xr-x 1 root wheel 10 Jan 27 12:42 /usr/local/lib/libgd.so -> libgd.so.4
-rwxr-xr-x 1 root wheel 440255 Jan 27 12:19 /usr/local/lib/libgd.so.2
-r–r--r-- 1 root wheel 276640 Jan 27 12:42 /usr/local/lib/libgd.so.4

-r–r--r-- 1 root wheel 32878 Jan 27 12:42 /usr/local/include/gd.h

for PNG
-rw-r–r-- 1 root wheel 161828 Jan 27 11:28 /usr/local/lib/libpng.a
lrwxrwxrwx 1 root wheel 11 Oct 29 2003 /usr/local/lib/libpng.so -> libpng.so.5
-r–r--r-- 1 root wheel 139428 Mar 22 2003 /usr/local/lib/libpng.so.5

lrwxr-xr-x 1 root wheel 12 Jan 27 11:28 /usr/local/include/png.h -> libpng/png.h
lrwxr-xr-x 1 root wheel 16 Jan 27 11:28 /usr/local/include/pngconf.h -> libpng/pngconf.h

for JPEG
-rw-r–r-- 1 root wheel 46205 Jan 27 11:57 /usr/local/include/jpeglib.h
-rw-r–r-- 1 root wheel 160076 Jan 27 11:57 /usr/local/lib/libjpeg.a
-rwxr-xr-x 1 root wheel 433 Jan 27 11:57 /usr/local/lib/libjpeg.la
lrwxrwxrwx 1 root wheel 12 Oct 29 2003 /usr/local/lib/libjpeg.so -> libjpeg.so.9
-rwxr-xr-x 1 root wheel 135629 Mar 22 2003 /usr/local/lib/libjpeg.so.9

My machine is a FreeBSD 4.9- STABLE and it’s running nagios 1.1.

Please help,

Neil
Edited ]


#2

I had the same trouble until I noticed this:
boutell.com/gd/manual2.0.33.html

./configure --prefix=/usr when installing gd fixed my error like the one you have.

You might also waht to edit /etc/ld.so.conf and then run
ldconfig

Edited Sat Jan 28 2006, 03:14PM ]


#3

still didn’t fix. I will try reinstalling the old version


#4

here are some good and bad news.

I downloaded nagios 2.0rc2 and used the same configure options. It found GD, jpeg and png libraries.

checking for gdImagePng in -lgd (order 1)… no
checking for gdImagePng in -lgd (order 2)… yes
GD library was found!

The bad news: something is wrong with the way configure in 1.3 looks for GD, jpeg and png library.