General
cancel
Showing results for 
Search instead for 
Did you mean: 

where can i found the libdb1.a library for linux Redhat 5 for x86_64 machine.

Gavisiddappa_1
Occasional Visitor

where can i found the libdb1.a library for linux Redhat 5 for x86_64 machine.

Hi All,

I have problem with compiling the source code on linux X86_64 bit machine, The ld fails because of unable to find the libdb1.a static library. I search the static library libdb1.a on web for rpm and source for X86-64 machine, I didn't find the this rpm or source code for this library , please suggest me where can get this rpm or source code for this library (libdb1.a) on redhat linux 5 for x86-64 bit machine.

Error is below:
./usr/bin/ld: cannot find -ldb1
collect2: ld returned 1 exit status

Thanks & Regards
Gavi
2 REPLIES
Matti_Kurkela
Honored Contributor

Re: where can i found the libdb1.a library for linux Redhat 5 for x86_64 machine.

If the source code was developed at your site, you should know what it requires. If it was developed elsewhere, see the README files and any other documentation that came with the source code to get more information about the pre-requisites for compiling the software.

"libdb1" might be a very old version of Berkeley database library. The current version is db4, available in the standard RHEL 5 distribution (package "db4" for binaries, "db4-devel" for the appropriate .h and .a files for compiling software that uses the library.

RHEL 5 also has a "compat-db" package that provides the libdb1 libraries (.so files only). The package description says this package is created to provide binary compatibility with *RedHat 7.x*, which is very old and out of support.

The compat-db package is for running old software for which you have no source code.
No new software should be compiled with libdb1 any more: the software should be updated to use the newer version of the library.

I don't know what you're trying to compile, but I think it would be a really good idea to try and find a newer version of the source code... hopefully with db4 support already integrated.

If you really must, find the libdb1 source RPM for RedHat 7.x in RedHat's old product archive:

ftp://archive.download.redhat.com/pub/redhat/linux/

Use the "rpmbuild" command with the old source RPM to compile a new set of binary RPMs for your RHEL 5. The command should automatically generate at least two RPM packages: a libdb1 RPM with the binaries and a libdb1-devel RPM with the .a and .h files.

MK
MK
Gavisiddappa_1
Occasional Visitor

Re: where can i found the libdb1.a library for linux Redhat 5 for x86_64 machine.

Hi Matti,

Thanks for your suggestion. As per your suggestion i downloaded the open suse linux db1 and db1-devl rpms(we didn't find el5 rpms) and tried to compile my source code, some modules successful and one module unable to link this static library because the one intermediate module generated without -fPIC options, Becuase of this it fails. Then we plan to go higher version db4 databases, we modified our source code and compile and generated rpms. Still we didn't tested this new rpm files on x86_64 bit machine.

Thanks for your help.

Thanks & Regards
Gavi