Page 1 of 2

you don't have the GD library installed

Posted: Tue Nov 09, 2021 10:51 am
by tbarnett
I've been running Nagios for multiple years and am on 5.8.6 at the present. I was offered an upgrade today and when I tried to do it I got the following error.

Is this something new?

What has gone wrong?
thx
Tom

checking for gdImagePng_jpg in -lgd... no
checking for gdImagePng_jpg_ft in -lgd... no
checking gd.h usability... no
checking gd.h presence... no
checking for gd.h... no

** Ooops, one of many bad things happened:

a) You don't have the GD library installed.
Get it from http://www.boutell.com, compile it and
use either --with-gd-lib=DIR and --with-gd-inc=DIR to specify
its location. You might also have to use --with-z-inc,
--with-z-lib and --with-png-inc, --with-png-lib for gd
versions 1.6 and higher. Check config.log for more
information on the problem.

b) You have the GD library installed, but not the gd.h
header file. Download the source (see above) and use
--with-gd-inc=DIR to specify where the file can be found.

c) You have the library and the header file installed, but
you also have a shared GD library in the same directory.
Remove the shared library files and/or links (e.g.
libgd.so.2.0.0, libgd.so and libgd.so.2). This is especially
likely if you're using a recent (post 1.8.4) version of GD
and didn't configure it with --disable-shared.

d) You have gd library installed and also it's headers, but you are
missing libpng (and headers) or freetype (and headers)
(mrtg does not use freetype, but if your copy of gd is precompiled
against it, you have to install it ...

Consider following the instructions in doc/mrtg-unix-guide.txt
[[email protected]@nagios nagiosxi]$

Re: you don't have the GD library installed

Posted: Tue Nov 09, 2021 10:54 am
by tbarnett
Here are the pertinent parts of a yum list installed.

gcc.x86_64 4.8.5-44.el7 @rhel-7-server-rpms
gcc-c++.x86_64 4.8.5-44.el7 @rhel-7-server-rpms
gd.x86_64 2.0.35-27.el7_9 @rhel-7-server-rpms
gdb.x86_64 7.6.1-120.el7 @rhel-7-server-rpms
gdbm.x86_64 1.10-8.el7 @anaconda/7.6
gdbm-devel.x86_64 1.10-8.el7 @rhel-7-server-rpms
gdk-pixbuf2.x86_64 2.36.12-3.el7 @rhel-7-server-rpms
geoipupdate.x86_64 2.5.0-1.el7 @rhel-7-server-rpms

Re: you don't have the GD library installed

Posted: Wed Nov 10, 2021 11:09 am
by ssax
Please install this package then try again:

Code: Select all

yum install gd-devel -y

Re: you don't have the GD library installed

Posted: Wed Nov 10, 2021 2:22 pm
by tbarnett
No joy

Doesn't seem to be available.

[[email protected]@nagios ~]$ sudo yum install gd-devel
Loaded plugins: product-id, search-disabled-repos, subscription-manager
No package gd-devel available.
Error: Nothing to do
[[email protected]@nagios ~]$

Re: you don't have the GD library installed

Posted: Thu Nov 11, 2021 10:11 am
by MonitorGuy
I checked the site www.boutell.com and it redirected me to a site in the UK selling loans.

Also having issues with the 5.8.7 upgrade, please provide a fix.

Thanks,

Craig

Re: you don't have the GD library installed

Posted: Thu Nov 11, 2021 11:12 am
by kfanselow
Hi Craig,

Could you confirm your OS version and the repos you're using ? It looks like gd-devel may not be available in some repos.

Code: Select all

uname -a 
cat /etc/*release 
yum repolist 
Based on the info we do have it appears that you are using RHEL 7 and potentially could install the CentOS version which can be found here:

Code: Select all

http://mirror.centos.org/centos/7/os/x86_64/Packages/gd-devel-2.0.35-26.el7.x86_64.rpm
Thanks and Best Regards,
Keith

Re: you don't have the GD library installed

Posted: Thu Nov 11, 2021 12:58 pm
by MonitorGuy
I did a "yum search php" and this caught my attention:

php-gd.x86_64 : A module for PHP applications for using the gd graphics library - will this module suffice, or is there something else this upgrade needs?

We are running on Redhat release 7.9 (Maipo)

Thanks,

Craig

Re: you don't have the GD library installed

Posted: Thu Nov 11, 2021 3:26 pm
by MonitorGuy
Appears the original post from Tom is also running Redhat 7.x, so your recommendation to pull the library from CENTOS repo may be helpful for both of us...

Linux <hostname> 3.10.0-1160.45.1.el7.x86_64 #1 SMP Fri Sep 24 10:17:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
repo id repo name status
nagios-base Nagios 100
nagiosxi-deps Nagios XI Dependencies 31
repo.nagios.com_nagios added from: https://repo.nagios.com/nagios/7 100
repo.nagios.com_nagiosxi-deps added from: https://repo.nagios.com/nagiosxi-deps/7 31
rhel-7-server-optional-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server - Optional (RPMs) 23,135
rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 32,349
repolist: 55,746

Will let you know once I confer with my Linux admin.

Regards,

Craig

Re: you don't have the GD library installed

Posted: Thu Nov 11, 2021 3:46 pm
by kfanselow
Hi Craig,

I don't think php-gd.x86_64 is what you're looking for however you can always pull it down and run an rpm -qpl against it to look.

What the build process for Nagios needs is the gd header files and libraries in the development bundle. These are needed to build MRTG which generates some of the system/performance graphs. It's an old library and possible that RedHat stopped maintaining the package.

Here's the list of files from the gd-devel rpm:
http://mirror.centos.org/centos/7/os/x8 ... x86_64.rpm

Code: Select all

#   rpm -qpl gd-devel-2.0.35-26.el7.x86_64.rpm 
/usr/bin/gdlib-config
/usr/include/entities.h
/usr/include/gd.h
/usr/include/gd_io.h
/usr/include/gdcache.h
/usr/include/gdfontg.h
/usr/include/gdfontl.h
/usr/include/gdfontmb.h
/usr/include/gdfonts.h
/usr/include/gdfontt.h
/usr/include/gdfx.h
/usr/lib64/libgd.so
/usr/lib64/pkgconfig/gdlib.pc
/usr/share/doc/gd-devel-2.0.35
/usr/share/doc/gd-devel-2.0.35/index.html
Thanks and Best Regards,
Keith

Re: you don't have the GD library installed

Posted: Thu Nov 11, 2021 3:47 pm
by MonitorGuy
Did some more searching and found this: http://rpm.pbone.net/info_idpl_55225190 ... 4.rpm.html

Appears there are requirements for gd-devel it may also need to install if we don't already have.

Good thing we are using the test server!

Take a snapshot...

Regards,

Craig