Webalizer produces: error while loading shared libraries: libgd.so.2

When you run the following, you get:

[root@server]# webalizer
webalizer: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory

That means that the program is unable to find the gd library required to run it. You should already have the library, so you just have to tell the binary linker where to find it.

Type the following:

echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig

And then try running webalizer again. The error should be gone.

If you *don't* have the gd library, install it:

yum install gd

Another solution, since custombuild will install it for you, just in a different location than webalizer is looking, is to link it, eg:

ln -s /usr/local/lib/libgd.so.2 /usr/lib/libgd.so.2

If webalizer is functioning correctly, you should see something similar to:

[root@server]# webalizer
Webalizer V2.01-10 (Linux 2.4.21-9.0.1.EL) English
Using logfile STDIN (clf)
Creating output in current directory
Hostname for reports is 'es.jbmc-software.com'
History file not found...

f all of that fails, then you can just download a static binary from our files server:

http://files.directadmin.com/services/7.2/webalizer \\
http://files.directadmin.com/services/7.3/webalizer \\
http://files.directadmin.com/services/8.0/webalizer \\
http://files.directadmin.com/services/9.0/webalizer \\
http://files.directadmin.com/services/fedora_1/webalizer \\
http://files.directadmin.com/services/fedora_2/webalizer \\
http://files.directadmin.com/services/fedora_3/webalizer \\
http://files.directadmin.com/services/es_3.0/webalizer \\
http://files.directadmin.com/services/freebsd4.8/webalizer \\
http://files.directadmin.com/services/freebsd5.1/webalizer \\
http://files.directadmin.com/services/debian_3.0/webalizer \\
http://files.directadmin.com/services/debian_3.1/webalizer \\

Related forum thread: If you ever have any problems with webalizer, all you need to do is get a new static binary. Eg, for Fedora 3, you'd type: Code:

wget -O /usr/bin/webalizer http://files.directadmin.com/services/fedora_3/webalizer
chmod 755 /usr/bin/webalizer

For FreeBSD 4.x: Code:

wget -O /usr/local/bin/webalizer http://files.directadmin.com/services/freebsd4.8/webalizer
chmod 755 /usr/local/bin/webalizer

Note for freebsd, the webalizer path is /usr/local/bin/webalizer. All other OS's use /usr/bin/webalizer

The reason these binaries will be less trouble is because they are static, meaning all required libraries are included in the binary itself, so you should never see a missing library error.

For a full webalize debug guide, see this

 
troubleshooting/webalizer.txt · Last modified: 2010/04/29 09:14 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki