Manully installing a shared library


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Manully installing a shared library
# 1  
Old 08-19-2011
Manully installing a shared library

I'm working with a 64 bit RedHat based Linux (Oracle EL 6.1).

[root@dbserver ~]# uname -r
2.6.32-100.34.1.el6uek.x86_64


I have extracted a 32 bit shared library from within a RPM (rpm2cpio xx.rpm | cpio -idmv) and copied it to /lib. Then ran the ldconfig to update the cache. I can see the symbolic link is created in /lib as well.

[root@testserver ~]# ldconfig -p | grep -i /lib/libexpat
libexpat.so.1 (libc6) => /lib/libexpat.so.1

[root@testserver ~]#
cd /lib
[root@testserver lib]#
ls -l libexpat*
lrwxrwxrwx. 1 root root 17 Aug 19 12:53 libexpat.so.1 -> libexpat.so.1.5.2
-rwxr-xr-x. 1 root root 160168 Aug 19 12:08 libexpat.so.1.5.2


However, when I want to install other 32-bit RPMs that depend on libexpat.so.1, it's reported as missing: libexpat.so.1 is needed by XXX.rpm

Any help is greatly appreciated.
# 2  
Old 08-19-2011
What is the exact command you are using to install the other 32-bit RPMs?
# 3  
Old 08-19-2011
rpm -ivh XXX.rpm
# 4  
Old 08-19-2011
maybe it wants the .so file under /usr/lib and not /lib. Try that, create a soft link under /usr/lib
# 5  
Old 08-19-2011
I have. But no joy.

[root@testserver lib]# ls -l /usr/lib/libexpat*
lrwxrwxrwx. 1 root root 27 Aug 19 13:16 /usr/lib/libexpat.so.1 -> ../../lib/libexpat.so.1.5.2
# 6  
Old 08-19-2011
Quote:
Originally Posted by gheibia
However, when I want to install other 32-bit RPMs that depend on libexpat.so.1, it's reported as missing: libexpat.so.1 is needed by XXX.rpm
Just copying the right file into the right place doesn't mean RPM knows about it.

RPM is supposed to track not just the existence of a file but its versions and so forth, so it keeps its own records of what's around. You might have to force it to install without dependencies, but that could have bad consequences later.
# 7  
Old 08-19-2011
Doesn't ldconfig share the library system-wide?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Add shared members from library to same library in a different directory

I'm trying to install libiconv to AIX 7.1 from an rpm off of the perzl site. The rpm appears to install but I get this error message. add shr4.o shared members from /usr/lib/libiconv.a to /opt/freeware/lib/libiconv.a add shr.o shared members from /usr/lib/libiconv.a to ... (5 Replies)
Discussion started by: kneemoe
5 Replies

2. Programming

Shared library with acces to shared memory.

Hello. I am new to this forum and I would like to ask for advice about low level POSIX programming. I have to implement a POSIX compliant C shared library. A file will have some variables and the shared library will have some functions which need those variables. There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies

3. Programming

Makefile shared library g++

I'm having trouble with my makefile, I'm trying to code a shared library to be used by another program *EDIT* Found the solution: CC = g++ MODULES= readconfig.o ReadConfigLib.o OBJECTS= RCLOBJECTS= ReadConfigLib.cpp readconfig.cpp configDefinitions.h readconfig.h ReadConfigLib.h... (0 Replies)
Discussion started by: james2432
0 Replies

4. Shell Programming and Scripting

How to change a Makefile from building static library to shared library?

Hi: I have a library that it only offers Makefile for building static library. It built libxxx.a file. How do I in any way build a shared library? (either changin the Makefile or direct script or command to build shared library) Thanks. (1 Reply)
Discussion started by: cpthk
1 Replies

5. Programming

Shared memory for shared library

I am writing a shared library in Linux (but compatible with other UNIXes) and I want to allow multiple instances to share a piece of memory -- 1 byte is enough. What's the "best" way to do this? I want to optimize for speed and portability. Obviously, I'll have to worry about mutual exclusion. (0 Replies)
Discussion started by: otheus
0 Replies

6. Programming

shared library not found

Hello, On a Centos 5.0 box, I have two versions of a library (sqlite): (1) in /usr/lib that was installed using yum (maybe from php but I am not really sure) (2) in /usr/local/lib that I installed myself by compiling from the source code. My C++ program contains the following lines: ... (12 Replies)
Discussion started by: JCR
12 Replies

7. Programming

Shared memory in shared library

I need to create a shared library to access an in memory DB. The DB is not huge, but big enough to make it cumbersome to carry around in every single process using the shared library. Luckily, it is pretty static information, so I don't need to worry much about synchronizing the data between... (12 Replies)
Discussion started by: DreamWarrior
12 Replies

8. UNIX for Advanced & Expert Users

shared library

What is the primary difference between static library and dynamic library? and how to write static shared library? (1 Reply)
Discussion started by: areef4u
1 Replies

9. SCO

Creation of Shared library

Hi all, I am new to sco unix. I would like to know abt the procedure to create shared library in Sco-unix. Is it differ from linux? any help?? Thanx in Advance!!!!! (0 Replies)
Discussion started by: sarangb
0 Replies

10. Programming

Shared Library

hello all I want to work in shared libraries how can i work in Linux Environment ? (2 Replies)
Discussion started by: rajashekaran
2 Replies
Login or Register to Ask a Question