LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Webalizer unable to find libdb-4.4.so (https://www.linuxquestions.org/questions/linux-server-73/webalizer-unable-to-find-libdb-4-4-so-4175488830/)

grob115 12-22-2013 01:20 AM

Webalizer unable to find libdb-4.4.so
 
Just downloaded binary version of Webalizer but for some reason it is giving me an error about libdb-4.4.so not being available.

Code:

[root@uat webalizer]# ./webalizer -c webalizer.conf
./webalizer: error while loading shared libraries: libdb-4.4.so: cannot open shared object file: No such file or directory
[root@uat webalizer]#

What's really puzzling me is I can't find any RPM packages providing this library on pbone.net. In fact the closest I can find is one for libdb-4.8.so from the following link. http://rpm.pbone.net/index.php3/stat....i386.rpm.html

I have downloaded and installed this RPM. It extracted the following files:
/usr/lib/libdb-4.8.so
/usr/lib/libdb_cxx-4.8.so

I then ran the following:
ln -s /usr/lib/libdb-4.8.so /usr/lib/libdb-4.4.so

Note how silly this is? Questions I have now:
1) How can I trust that this RPM package is good? My CentOs Yum didn't find it from the standard CentOs depos.
2) It's a 4.8, not 4.4. Where can I find 4.4?
3) The version I had before installing this RPM is 4.3. My box has the following files:
/usr/lib/libdb-4.3.so -> ../../lib/libdb-4.3.so
/usr/lib/libdb_cxx-4.3.so
Note the libdb-4.3.so is actually under /lib/libdb-4.3.so? Any idea why this is here? 4) The fact that I've installed the RPM directly rather than using Yum means my Yum isn't aware of this. How do I fix this?

deep27ak 12-26-2013 04:09 AM

I wouldn't do such thing especially on my production servers. Now even I have faced these issues but most of the time it happened that the library file was already there in my system and I just had to add the path variable.

I have written an article on the same in case it helps. make sure you check your distro before running any commands
Error while loading shared libraries

Also in case it is not in your machine, there might be a possibility that this library file is loaded using some other rpm file.

In Red Hat you can check using
Code:

# yum whatprovides */libdb-4.4.so
Once you get the name of the original rpm file, try to install using yum or look out for it in rpm.pbone.net

grob115 12-26-2013 09:07 AM

Hi thanks. Yes I know what you meant in your article about the LD_LIBRARY_PATH but don't think it's the issue here. One of the points I was trying to make was there appears to be no libdb-4.4.so available anywhere. Now if you use the following I'm unable to find anything.
Code:

yum whatprovides */libdb-4.4.so
No Matches found


John VV 12-26-2013 02:58 PM

Quote:

Just downloaded binary version of Webalizer
from where ?
it is never a good idea on the older CentOS 5 ( guessing this from first post )
to grab some random "prebuilt" program from some random site
the current:
"webalizer-2.23-08-src.tgz"
http://www.webalizer.org/download.html

grob115 12-26-2013 06:57 PM

Hi I downloaded from the same page except I downloaded the binary version under the link named as "Linux ELF - Intel x86".

John VV 12-26-2013 08:32 PM

Quote:

I downloaded the binary version under the link named as "Linux ELF - Intel x86".
so this is a 32 bit server running a 32 bit OS ?

if it is a 64 bit OS ,that 32 bit program will need to have the 32 bit compatibility software installed on the 64 bit OS.


i would build the source code
that way it is built FOR YOUR system

it looks like is should build with no problems
Code:

su -
yum groupinstall "Development Tools" "Development Libraries"
-------- then this ---------
yum install gd-devel zlib zlib-devel

as a normal user
----- WITHOUT GeoIP support ------
Code:

cd /to/the/webalizer/src/folder
./configure --prefix=/etc/webalizer
make
su
make install

then configure the program for apache as per the Webalizer docs

using "vi" or"nano" or if a gui is being used "gedit" or "emacs"


Bit i never used webalizer, i prefer " AWStats "


with geoip support see:
http://www.lifelinux.com/how-to-inst...zer-on-centos/

grob115 12-26-2013 09:39 PM

Quote:

so this is a 32 bit server running a 32 bit OS ?

if it is a 64 bit OS ,that 32 bit program will need to have the 32 bit compatibility software installed on the 64 bit OS.
It's a 64-bit CentOS. Yes the binary version is 32-bit but thought 32-bit code should run on 64-bit OS. No? What's the "32 bit compatibility software"?

John VV 12-26-2013 10:03 PM

The 32 bit compt software is the second 32 bit operating system ( well *.so's mostly "/usr/lib") that lets 32 bit programs run on a 64 bit OS

you will have to install a 32 bit libdb4.4

or

build the source code


the 32 bit compatibality software is like Microsofts
compatibality mode on XP
that let you run win95,98 16 bit code on the 32 bit XP

grob115 12-27-2013 12:20 AM

Sorry you are referring to the 32-bit OS version, or a piece of software I'd install on my 64-bit OS?

John VV 12-27-2013 12:39 AM

all ( well almost all ) the 64 bit x86_64.rpm's in the 64 bit centos have i686.rpm's
the 686 rpms ARE the 32 bit versions
run a yum search and have a look

Code:

su -
------ your root password when asked for -------
yum search libdb

libdb is the "Berkeley DB Database Library "

you will see i686 ( or i586 or i386) and x86_64 versions


but it might just be best to build webalizer from the source code

grob115 12-27-2013 01:49 AM

Strange.... I'm not able to list contents of the package.
Code:

[root@uat bin]# yum info libdb-4_8.i386
Installed Packages
Name      : libdb-4_8
Arch      : i386
Version    : 4.8.30
Release    : 20.2.1
Size      : 20 M
Repo      : installed
Summary    : Berkeley DB Database Library Version 4.8
URL        : http://www.sleepycat.com
License    : BSD-3-Clause
Description: The Berkeley DB Database is a programmatic toolkit that provides
          : database support for applications.
          :
          : This package contains the necessary runtime libraries.

[root@uat bin]# repoquery --list libdb-4_8
[root@uat bin]# repoquery -lq libdb-4_8.i386
[root@uat bin]#


John VV 12-27-2013 02:48 AM

back to the first post
you have 4.8 installed and the prebuilt needs 4.4
a VERY old version

the prebuilt was built using that old version

if you build the current source for webalizer
you will be using the 4.8 version you have installed

grob115 12-27-2013 05:14 AM

I understand that bit. But any idea why following isn't returning anything?
Code:

repoquery -lq libdb-4_8.i386

John VV 12-27-2013 02:11 PM

because you installed a random version of "The Berkeley DB database library" from some random site
and did not use the centos repos

on my install of ScientificLinuc 6.4 ( i still do not know WHAT version of centos you are using ??? )
on sl6.4 it is "db4"
Code:

su -
yum search db4
=============================== N/S Matched: db4 ===============================
compat-db42.i686 : The Berkeley DB database 4.2.52 compatibility library
compat-db42.x86_64 : The Berkeley DB database 4.2.52 compatibility library
compat-db43.i686 : The Berkeley DB database 4.3.29 compatibility library
compat-db43.x86_64 : The Berkeley DB database 4.3.29 compatibility library
db4.i686 : The Berkeley DB database library (version 4) for C
db4.x86_64 : The Berkeley DB database library (version 4) for C
db4-cxx.i686 : The Berkeley DB database library (version 4) for C++
db4-cxx.x86_64 : The Berkeley DB database library (version 4) for C++
db4-devel.i686 : C development files for the Berkeley DB (version 4) library
db4-devel.x86_64 : C development files for the Berkeley DB (version 4) library
db4-devel-static.x86_64 : Berkeley DB (version 4) static libraries
db4-java.x86_64 : Development files for using the Berkeley DB (version 4) with
                : Java
db4-tcl.x86_64 : Development files for using the Berkeley DB (version 4) with
              : tcl
db4-utils.x86_64 : Command line tools for managing Berkeley DB (version 4)
                : databases

and the current version for 6.4 is db4 version 4.7.25
Code:

yum info db4.x86_64

Installed Packages
Name        : db4
Arch        : x86_64
Version    : 4.7.25
Release    : 17.el6
Size        : 1.5 M
Repo        : installed
From repo  : sl6x
Summary    : The Berkeley DB database library (version 4) for C
URL        : http://www.oracle.com/database/berkeley-db/
License    : Sleepycat and BSD
Description : The Berkeley Database (Berkeley DB) is a programmatic toolkit that
            : provides embedded database support for both traditional and
            : client/server applications. The Berkeley DB includes B+tree,
            : Extended Linear Hashing, Fixed and Variable-length record access
            : methods, transactions, locking, logging, shared memory caching,
            : and database recovery. The Berkeley DB supports C, C++, Java, and
            : Perl APIs. It is used by many applications, including Python and
            : Perl, so this should be installed on all systems.


grob115 12-28-2013 03:00 AM

Okay this is what happened.
1) I tried searching for the lib using the following but wasn't able to find anything.
Code:

yum info libdb
yum info berkeley

2) I tried searching for the package name using the lib file name but wasn't able to find anything.
Code:

repoquery -lq libdb-4_8.i386
3) I tried looking online for something close and I found the package mentioned earlier.

It appears we can conclude with the following?
1) I used the wrong package name. It should be db4 rather than libdb or berkeley.
2) The latest package for db4 is still only going to give libdb-4.3.so but not libdb-4.4.so required by Webalizer.

I'm using CentOS release 5.5 (Final).

Package installed on my system now.
Code:

[root@uat ~]# yum info db4
Installed Packages
Name      : db4
Arch      : i386
Version    : 4.3.29
Release    : 10.el5
Size      : 2.0 M
Repo      : installed
Summary    : The Berkeley DB database library (version 4) for C.
URL        : http://www.sleepycat.com/
License    : GPL
Description: The Berkeley Database (Berkeley DB) is a programmatic toolkit that
          : provides embedded database support for both traditional and
          : client/server applications. The Berkeley DB includes B+tree, Extended
          : Linear Hashing, Fixed and Variable-length record access methods,
          : transactions, locking, logging, shared memory caching, and database
          : recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
          : used by many applications, including Python and Perl, so this should
          : be installed on all systems.

Name      : db4
Arch      : x86_64
Version    : 4.3.29
Release    : 10.el5
Size      : 2.0 M
Repo      : installed
Summary    : The Berkeley DB database library (version 4) for C.
URL        : http://www.sleepycat.com/
License    : GPL
Description: The Berkeley Database (Berkeley DB) is a programmatic toolkit that
          : provides embedded database support for both traditional and
          : client/server applications. The Berkeley DB includes B+tree, Extended
          : Linear Hashing, Fixed and Variable-length record access methods,
          : transactions, locking, logging, shared memory caching, and database
          : recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
          : used by many applications, including Python and Perl, so this should
          : be installed on all systems.

Available Packages
Name      : db4
Arch      : i386
Version    : 4.3.29
Release    : 10.el5_5.2
Size      : 910 k
Repo      : updates
Summary    : The Berkeley DB database library (version 4) for C.
URL        : http://www.sleepycat.com/
License    : GPL
Description: The Berkeley Database (Berkeley DB) is a programmatic toolkit that
          : provides embedded database support for both traditional and
          : client/server applications. The Berkeley DB includes B+tree, Extended
          : Linear Hashing, Fixed and Variable-length record access methods,
          : transactions, locking, logging, shared memory caching, and database
          : recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
          : used by many applications, including Python and Perl, so this should
          : be installed on all systems.

Name      : db4
Arch      : x86_64
Version    : 4.3.29
Release    : 10.el5_5.2
Size      : 899 k
Repo      : updates
Summary    : The Berkeley DB database library (version 4) for C.
URL        : http://www.sleepycat.com/
License    : GPL
Description: The Berkeley Database (Berkeley DB) is a programmatic toolkit that
          : provides embedded database support for both traditional and
          : client/server applications. The Berkeley DB includes B+tree, Extended
          : Linear Hashing, Fixed and Variable-length record access methods,
          : transactions, locking, logging, shared memory caching, and database
          : recovery. The Berkeley DB supports C, C++, Java, and Perl APIs. It is
          : used by many applications, including Python and Perl, so this should
          : be installed on all systems.

Latest package still doesn't have libdb-4.4.so required.
Code:

[root@uat ~]# repoquery -lq db4.i386 | grep libdb
/lib/libdb-4.3.so
/usr/lib/libdb-4.3.so
/usr/lib/libdb_cxx-4.3.so
[root@uat ~]# repoquery -lq db4.x86_64 | grep libdb
/lib64/libdb-4.3.so
/usr/lib64/libdb-4.3.so
/usr/lib64/libdb_cxx-4.3.so



All times are GMT -5. The time now is 12:43 AM.