ldd doesn't see library libcrypto.so.4

General support questions
popo78
Posts: 8
Joined: 2014/05/04 19:17:30

ldd doesn't see library libcrypto.so.4

Post by popo78 » 2014/05/15 12:56:41

Hi,

Centos 6.5, because of libcrypto.so.4 i installed package openssl097a-0.9.7a-9.x86_64 already installed and latest version from PUIAS_6 repository
i try to start:

Code: Select all

 /home/bin/i86bi-linux-l3.bin
/home/bin/i86bi-linux-l3.bin: error while loading shared libraries: libcrypto.so.4: wrong ELF class: ELFCLASS64
but there is this library in mys sytem:
whereis libcrypto.so.4
libcrypto.so: /lib/libcrypto.so.4 /usr/lib/libcrypto.so.4 /lib64/libcrypto.so.4 /usr/lib64/libcrypto.so /usr/lib64/libcrypto.so.4 /usr/lib64/libcrypto.so.10
ldd /home/bin/i86bi-linux-l3.bin
linux-gate.so.1 => (0x00e47000)
libnsl.so.1 => /lib/libnsl.so.1 (0x009f9000)
libdl.so.2 => /lib/libdl.so.2 (0x00ad9000)
libcrypto.so.4 => not found
libm.so.6 => /lib/libm.so.6 (0x001ed000)
libgcc_s.so.1 => not found
libc.so.6 => /lib/libc.so.6 (0x00532000)
/lib/ld-linux.so.2 (0x00510000)
after straced my .bin i had to add some directories and copy there libcrypto.so.4

Code: Select all

ldconfig -p | grep crypto
 libk5crypto.so.3 (libc6,x86-64) => /lib64/libk5crypto.so.3
 libk5crypto.so (libc6,x86-64) => /usr/lib64/libk5crypto.so
 libcrypto.so.10 (libc6,x86-64) => /usr/lib64/libcrypto.so.10
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x8008000004000000) => /lib/tls/i686/sse2/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x8008000000000000) => /lib/tls/i686/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x8008000000000000) => /usr/lib/tls/i686/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x8000000004000000) => /lib/tls/sse2/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x8000000004000000) => /usr/lib/tls/sse2/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x0008000004000000) => /lib/i686/sse2/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x0008000004000000) => /usr/lib/i686/sse2/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x8000000000000000) => /lib/tls/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x8000000000000000) => /usr/lib/tls/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x0008000000000000) => /lib/i686/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64, hwcap: 0x0008000000000000) => /usr/lib/i686/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64) => /lib64/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64) => /lib/libcrypto.so.4
 libcrypto.so.4 (libc6,x86-64) => /usr/lib/libcrypto.so.4
 libcrypto.so (libc6,x86-64) => /usr/lib64/libcrypto.so
What can i do to get this works ?
thanks for any help or clue

greetings,
pop

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: ldd doesn't see library libcrypto.so.4

Post by gerald_clark » 2014/05/15 13:12:08

CentOS 6 ships openssl098e
You have replaced core CentOS packages with who know what from foreign repos.
What is /home/bin/i86bi-linux-l3.bin ?

Do you have a question about some CentOs supplied program/library?

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: ldd doesn't see library libcrypto.so.4

Post by stevemowbray » 2014/05/15 14:19:59

Whatever the application is, it is 32-bit and it is seeing 64-bit libraries for some reason.

popo78
Posts: 8
Joined: 2014/05/04 19:17:30

Re: ldd doesn't see library libcrypto.so.4

Post by popo78 » 2014/05/15 17:22:13

i installed openssl098e, didn't help, still no works

from http://evilrouters.net/2011/01/18/cisco-iou-faq/
While the images should run on any 32- or 64-bit (x86/amd64) Linux host, I highly recommend using Debian GNU/Linux. Any examples that I provide in this FAQ will be based upon Cisco IOU running on Debian.
my strace:

Code: Select all

 strace /home/bin/i86bi-linux.bin
execve("/home/bin/i86bi-linux.bin", ["/home/bin/i86bi-linux-"...], [/* 25 vars */]) = 0
[ Process PID=18405 runs in 32 bit mode. ]
brk(0)                                  = 0x1392e000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xfffffffff7731000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=50537, ...}) = 0
mmap2(NULL, 50537, PROT_READ, MAP_PRIVATE, 3, 0) = 0xfffffffff7724000
close(3)                                = 0
open("/lib/tls/i686/sse2/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/lib/tls/i686/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/tls/i686/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/lib/tls/i686", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/tls/sse2/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/lib/tls/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/tls/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/lib/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/i686/sse2/libcrypto.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/i686/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/i686/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/lib/i686", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/sse2/libcrypto.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/lib/libcrypto.so.4", O_RDONLY)   = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
open("/usr/lib/tls/i686/sse2/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/usr/lib/tls/i686/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/i686/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/usr/lib/tls/i686", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/sse2/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/usr/lib/tls/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/usr/lib/tls", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/i686/sse2/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/usr/lib/i686/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/i686/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/usr/lib/i686", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/sse2/libcrypto.so.4", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/sse2", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/libcrypto.so.4", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300{\206`3\0\0\0"..., 512) = 512
close(3)                                = 0
stat64("/usr/lib", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0
writev(2, [{"/home/bin/i86bi-linux-"..., 62}, {": ", 2}, {"error while loading shared libra"..., 36}, {": ", 2}, {"libcrypto.so.4", 14}, {": ", 2}, {"wrong ELF class: ELFCLASS64", 27}, {"", 0}, {"", 0}, {"\n", 1}], 10/home/bin/i86bin-linux.bin: error while loading shared libraries: libcrypto.so.4: wrong ELF class: ELFCLASS64
) = 146
exit_group(127)                         = ?

I'm a little confused what i'll should do..
Last edited by popo78 on 2014/05/15 17:31:37, edited 2 times in total.

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: ldd doesn't see library libcrypto.so.4

Post by gerald_clark » 2014/05/15 17:28:39

Since you have not told us what you are trying to accomplish, it is difficult to say.

popo78
Posts: 8
Joined: 2014/05/04 19:17:30

Re: ldd doesn't see library libcrypto.so.4

Post by popo78 » 2014/05/15 17:35:12

i just try to run this bin
./i86bi-linux.bin 42
./i86bi-linux.bin: error while loading shared libraries: libcrypto.so.4: wrong ELF class: ELFCLASS64
On my previous system, slack 13.0, it worked but the disk failed so now i have centos 6.5 and this problems..

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: ldd doesn't see library libcrypto.so.4

Post by gerald_clark » 2014/05/15 17:48:10

Why are you trying to run that bin?
Where did you get it?
What are you REALLY trying to accomplish?
I'm sure you are not trying to run the bin for no purpose.
We might be able to recommend a working solution if we knew what you were trying to do.

popo78
Posts: 8
Joined: 2014/05/04 19:17:30

Re: ldd doesn't see library libcrypto.so.4

Post by popo78 » 2014/05/15 19:06:49

This is some kind of router simulator like gns/dynamips or olive. I'd like test some scenario on it

User avatar
TrevorH
Site Admin
Posts: 33220
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: ldd doesn't see library libcrypto.so.4

Post by TrevorH » 2014/05/15 19:32:25

Nothing in the CentOS repos supplies libcrypto.so.4 so the version you have installed is the wrong architecture - most likely you have a 32 bit app and a 64 bit library. Find one or the other of the opposite architecture and maybe you can make it work.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

popo78
Posts: 8
Joined: 2014/05/04 19:17:30

Re: ldd doesn't see library libcrypto.so.4

Post by popo78 » 2014/05/15 20:03:24

centos 5.9 + openssl097a.i386 0:0.9.7a-11.el5_8.2 = success :)
centos 6.5 + openssl097a-0.9.7a-9.x86_64 = defeat :(

thanks for help!

Post Reply