LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
LinkBack Search this Thread
Old 07-03-2012, 11:21 AM   #1
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Rep: Reputation: Disabled
error while loading shared libraries: libcrypt.so.1: cannot open shared object file:


I am trying to run under opensuse 12.1 the folowing executable
(here is the output from file:
sessmgr: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped)

and I always get the following error message :

sessmgr: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

I have set LD_ASSUME_KERNEL=2.2.5

The strange thing is that libcrypt.so.1 exists and all locations are set properly in LD_LIBRARY_PATH

Any good ideas appreciated

Best regards
Christos Michail

my e-mail is crmichail@gmail.com
 
Old 07-03-2012, 11:30 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,199

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Welcome to LQ.

May be your OS is 64bits ? The command : 'uname -m' will show.
 
Old 07-03-2012, 11:36 AM   #3
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you for your answer
uname -m says i686

and all executables on /bin /sbin /usr/bin are reported as 32 bit

Christos
 
Old 07-03-2012, 12:13 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2013.07, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,199

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
sessmgr: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.2.5
Well, then please try : 'ldd sessmgr'

"sessmgr" could be an old file requiring a glibc object "2.2.5"
not present in the Suse 12.1 "glibc-2.14.1" files.
( libcrypt.so.1 is part of glibc-2.14.1 ).

.
 
Old 07-03-2012, 12:23 PM   #5
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thanks again for the reply

Here is the output of ldd -v sessmgr

linux-gate.so.1 => (0xffffe000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xb76e5000)
libtermcap.so.2 => /usr/lib/libtermcap.so.2 (0xb76e0000)
libc.so.6 => /lib/libc.so.6 (0xb7573000)
/lib/ld-linux.so.2 (0xb7734000)

Version information:
./sessmgr:
libcrypt.so.1 (GLIBC_2.0) => /lib/libcrypt.so.1
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
libc.so.6 (GLIBC_2.2.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libcrypt.so.1:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/usr/lib/libtermcap.so.2:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.4) => /lib/libc.so.6
libc.so.6 (GLIBC_2.3.4) => /lib/libc.so.6
libc.so.6 (GLIBC_2.1) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

Best regards from Athens
Christos
 
Old 07-21-2012, 07:54 AM   #6
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
Smile

can you supply more information for it:

1) env | grep LD_LIBRARY_PATH

2) ls -l /lib/libcrypt.so.1 (it is a demo, use correct libcrypt.so.1 location instead).

: )
 
Old 07-21-2012, 10:55 AM   #7
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you very much for replying Buddy
Here is the information you requested

==================================================================================================== ==
## LD_ASSUME_KERNEL=2.4.7
LD_ASSUME_KERNEL=2.2.5
## LD_ASSUME_KERNEL=2.4.20
## LD_ASSUME_KERNEL=2.4.1
## LD_ASSUME_KERNEL=2.6.8
## LD_ASSUME_KERNEL=2.6.16
## LD_ASSUME_KERNEL=
export LD_ASSUME_KERNEL

LD_LIBRARY_PATH=/symbol/bp/lib:/lib:/usr/lib:/usr/local/lib
##### LD_LIBRARY_PATH=/symbol/lib:/symbol/usr/lib:/symbol/bp/lib:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
==================================================================================================== ==
This a part of the shell script that sets LD_ASSUME_KERNEL and LD_LIBRARY_PATH.
The executable in question is compiled for kernel 2.2.5.
Here is the file program output : sessmgr: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

And here is the "ls -l" you requested
lrwxrwxrwx 1 root root 23 Jun 15 19:08 /lib/libcrypt.so.1 -> /lib/libcrypt-2.14.1.so

Thank you very much again
Best regards
Christos
 
Old 07-21-2012, 09:20 PM   #8
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
please "ls -l /lib/libcrypt-2.14.1.so", to see whether it is existant, and see the permision.

and also can use the nm or ldd to /lib/libcrypt-2.14.1.so, to see whether it is valid.

all above is ok, then please cp it to your current directory (which your sessmgr locates), and rename it to libcrypt.so.1. and run again.

if still failed. we can write a test program, use dlopen, dlsym, dlclose (you can man dlopen to get enough help information) to test the libcrypt.so.1.

if the test is ok, then delete current directory libcrypt.so.1, and test again, if still ok, then it means libcrypt.so.1 is no problem, and the error which "sessmgr" generated is not the root cause of the issue (it is only the direct cause).

: )


IF all what I said above happened, then you can solve it in this way:

1) skip the program loading libraries in Makefile, to see what symbols can not be found.

2) comment all the calls for the unresolved symbols in your source code (maybe 90% source code must "deleted")

3) for basic symbols which not relative with libcrypt directly or indirectly, can let them uncomment (it will restore more than 85% source code).

4) for unresolved symbols, you can use nm or ldd (or another tools) to see which shared libraries they are located on, and then link them.

Please step by step to do these things, and be careful all the outputs of compiler and linker(need set -Wall), not skip every error and warning.

for every error or warning, if you do not know the meaning (or not know how to solve), you can ask the relative question here (in this thread).



Hope these information above may be helpful for you.

: )

Last edited by gchen; 07-21-2012 at 09:21 PM.
 
Old 07-22-2012, 09:06 AM   #9
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello there
Thank you again for the reply

That is the output of ldd -v

linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7571000)
/lib/ld-linux.so.2 (0xb76f7000)

Version information:
/lib/libcrypt-2.14.1.so:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

I also tried co cp the the library in the current directory as libcrypt.so.1 But nothing
I also changed the the mode of /lib/libcrypt-2.14.1.so to 777 But nothing again (Same message).

Unfortunately I have NOT the source code for "sessmgr" So I can't compile or relink
Looks like a desparate situation... And even more because all other binaries in the package are running without any problems

Thank you very much again
Best regards
Christos
 
Old 07-22-2012, 08:13 PM   #10
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
Ok, now I assume that you are also the tester or user of sessmgr, not the implementor of it (you can not get source code, it is not open source)

I think you can solve it in this way.

1) write a test program to test libcrypto.so, (can use dlopen, dlsym, dlclose lib c function to test, you can man dlopen to get more help).

2) if libcrypto.so truly no problem (mostly it is), can examine all logs of sessmgr outputs (maybe user verbos parameter, which is -v to let it output more logs).

3) find the help informations about it (relative local document, or google).

4) if all of above can not solve it (maybe truly happen), I think you can contact with the product provider (support team).


: )



Of cause has another way which can find the root cause of it, but it need more programming and disassemble skills:

1) use gdb to debug sessmgr (which is release version, and no source code)

2) set break point to dlopen function call.

3) run sessmgr in gdb.

4) when break point occur, can examine the input parameters and output results.

5) can also step into it to know more details of .so.

6) Please notice, for loading shared library, the disassembly code is a little complex, you truly need familiar with disassemble and know the shared library loading work flow, firstly.

7) I am sure, it is truly can get the root cause of this issue, but may be not quit suitable for normal users or testers.



At last, maybe I can not truly help you to solve the issue, but I hope these information are helpful for you.

: )
 
Old 07-24-2012, 11:29 PM   #11
RandomTroll
Member
 
Registered: Mar 2010
Distribution: Slackware
Posts: 244

Rep: Reputation: 26
You get the same error if a library libcrypt.so.1 depends on isn't. do an ldd on it. I recently had a partial upgrade problem that caused this error.
 
Old 07-26-2012, 01:45 PM   #12
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Hello there
Thank you for your reply

here is the ldd you recommended

# ldd /lib/libcrypt.so.1
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7556000)
/lib/ld-linux.so.2 (0xb76dc000)

does this ring any bell ??

Best regards
Christos
 
Old 07-26-2012, 01:47 PM   #13
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Also here is the output of ldd -v

# ldd -v /lib/libcrypt.so.1
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb75b7000)
/lib/ld-linux.so.2 (0xb773d000)

Version information:
/lib/libcrypt.so.1:
libc.so.6 (GLIBC_2.1.3) => /lib/libc.so.6
libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
/lib/libc.so.6:
ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.3) => /lib/ld-linux.so.2
ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2

by the way I run opensuse 12.1

Best regards again
Christos
 
Old 07-26-2012, 08:02 PM   #14
gchen
Member
 
Registered: May 2012
Location: Beijing China
Distribution: Asianux
Posts: 56

Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by xmixail View Post
Hello there
Thank you for your reply

here is the ldd you recommended

# ldd /lib/libcrypt.so.1
linux-gate.so.1 => (0xffffe000)
libc.so.6 => /lib/libc.so.6 (0xb7556000)
/lib/ld-linux.so.2 (0xb76dc000)

does this ring any bell ??

Best regards
Christos

I suggest to write a test for loading libcrypt.so.1.

1) If load succeed and get the symbol in it is ok, it proves libcrypt.so.1 is OK.

2) If load failed or get the symbol in it faild, it proves libcrypt.so.1 has issue.


we can use dlopen, dlsym, dlclose for test it (can man dlopen to get complete help information)

: )
 
Old 07-28-2012, 01:05 PM   #15
xmixail
LQ Newbie
 
Registered: Jul 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Thank you very much again buddy

i WILL TRY it

Best regards
Christos
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libgda-4.0.so.4: cannot open shared object file mahesh1234 Linux - Newbie 2 10-22-2013 11:06 PM
error while loading shared libraries: libtermcap.so.2: cannot open shared object file astroboy2000ir Linux - Software 3 12-07-2010 11:16 PM
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 12:05 PM
error while loading shared libraries: libstdc++.so.5: cannot open shared object file PaulyWally Debian 2 10-18-2008 05:59 PM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 05:10 PM


All times are GMT -5. The time now is 07:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration