Stone Steps Inc.

Article ID: Q20041126-01

Q: Why am I getting "library not found" errors when I run Stone Steps Webalizer on Linux?

A:Linux executables are built with references to the shared libraries they use. If one of these libraries is missing or is of an incorrect version, the executable will fail to launch. You can use the ldd command to see the missing libraries:

$ ldd webalizer
    libstdc++.so.6 => /usr/local/lib/libstdc++.so.6 (0x40018000)
    libm.so.6 => /lib/i686/libm.so.6 (0x40113000)
    libdl.so.2 => /lib/libdl.so.2 (0x40136000)
    libpthread.so.0 => /lib/i686/libpthread.so.0 (0x4013a000)
    libdb-4.4.so => not found
    libgd.so.2 => /usr/local/lib/libgd.so.2 (0x40220000)
    libz.so.1 => /usr/local/lib/libz.so.1 (0x4026f000)
    libc.so.6 => /lib/i686/libc.so.6 (0x40280000)
    libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0x403bc000)
    libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x403c7000)
    libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0x403e6000)
    libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0x40449000)
    /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

In the output above the Berkeley DB library, libdb-4.4.so, is reported as missing. In this case, as well as if you see any of the libraries listed below missing, you can try using the libraries included in the binary distribution of Stone Steps Webalizer.

  • libdb-4.4.so
  • libgd.so.2
  • libz.so.1
  • libpng12.so.0
  • libfreetype.so.6

If ldd  reports that it cannot find some other libraries, you may need to build Stone Steps Webalizer from the source (see Q20040929-02 for details).

In order to use the libraries listed above, set or modify the LD_LIBRARY_PATH environment variable to include the directory where Stone Steps Webalizer was installed:

$ LD_LIBRARY_PATH=/usr/local/webalizer/:$LD_LIBRARY_PATH
$ export LD_LIBRARY_PATH