LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   error while loading shared libraries (http://www.linuxquestions.org/questions/linux-newbie-8/error-while-loading-shared-libraries-612832/)

SPF 01-11-2008 06:50 AM

error while loading shared libraries
 
I have the following 2 systems with:
- Red Hat with 2.4.19 kernel
- Suse with 2.6.5-0 kernel

Both have programs compiled with i386 arch:

redhat# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), stripped

suse# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

But, Suse doesn't have gcc installed. So I cannot install my favorite programs.
FYI, I'm not allowed to install any rpm's on these systems. I do have root access.
Because both systems use the i386 arch, I tried copying one program (in this case objdump). I already knew I could expect errors:

suse# objdump
objdump: error while loading shared libraries: libopcodes-2.10.91.0.2.so: cannot open shared object file: No such file or directory

Of course I did a search on the forum and I found that there could be a lot of libraries involved.

When I review my problem, the best course of action would be to recompile the program on the Red Hat system and include the libraries in the binary.

But how?

zoranp 01-11-2008 10:53 AM

Try

ldd <path_to_filename/filename>

to obtain info on shared libraries needed. Copy them to /usr/lib or other suitable folder, and then as root execute

ldconfig -v

Word of wisdom:

Anyway, you should not mix shared libraries from different distributions, as they just migh colide with each other. Im sure that application in question is available as rpm package for Suse. Yast is your friend.

SPF 01-15-2008 04:48 AM

Yast is not installed and I'm not allowed to use it.


All times are GMT -5. The time now is 03:06 PM.