Birgalikda kutubxonalarni yuklashda xatolik: /usr/local/lib64/libssl.so.1.1

Centens 7 (7.3.1611) da openssl-1.1.0e ni tuzishga harakat qilaman. Lekin har qanday ogohlantirishsiz hamma narsani muvaffaqiyatli tuzganimdan so'ng, men biron-bir openssl buyrug'ini bajarayotganimda xatoga yo'l qo'yaman

[[email protected] openssl-1.1.0e]$ openssl version
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

Xatomi yoki xatomi?

Quyida tizim/konfiguratsiya haqida ba'zi ma'lumotlar

Konfiguratsiya:

[[email protected] openssl-1.1.0e]$ ./Configure linux-x86_64 --prefix=/usr/local --openssldir=/usr/local

Make/Make test:

...
All tests successful.
Files=91, Tests=486, 44 wallclock secs ( 0.47 usr  0.08 sys + 27.72 cusr 13.41 csys = 41.68 CPU)
Result: PASS
...

O'rnatish:

...
install libcrypto.a -> /usr/local/lib64/libcrypto.a
install libssl.a -> /usr/local/lib64/libssl.a
install libcrypto.so.1.1 -> /usr/local/lib64/libcrypto.so.1.1
link /usr/local/lib64/libcrypto.so -> /usr/local/lib64/libcrypto.so.1.1
install libssl.so.1.1 -> /usr/local/lib64/libssl.so.1.1
link /usr/local/lib64/libssl.so -> /usr/local/lib64/libssl.so.1.1
...

Biroq, agar ldd bilan tekshiruv qilsam, ikkita kutubxonaga qaramasdan Make install o'z ishini qildi ...

[[email protected] openssl-1.1.0e]$ ldd /usr/local/bin/openssl
linux-vdso.so.1 =>  (0x00007fffcfe75000)
/lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007fa5cd77a000)
libssl.so.1.1 => not found
libcrypto.so.1.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007fa5cd55d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa5cd341000)
libc.so.6 => /lib64/libc.so.6 (0x00007fa5ccf7f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa5cd981000)

Distro tomonidan openssl versiyasini allaqachon o'rnatganman:

[[email protected]]$ openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

[[email protected]]$ which openssl
/usr/bin/openssl

Yum haqida info openssl:

...
Installed Packages
Name        : openssl
Arch        : x86_64
Epoch       : 1
Version     : 1.0.1e
Release     : 60.el7_3.1
Size        : 1.5 M
Repo        : installed
From repo   : updates
...

Har qanday yordam yoki taklifni qadrlang!

5
/sbin/ldconfig -p nima taklif qilish kerak? O'rnatishdan keyin kutubxonalarni ko'rsatadimi? /sbin/ldconfig -n/usr/local/lib64 yordam beradimi?
qo'shib qo'ydi muallif jww, manba
Ha, endi u lib64 dan foydalanadi: libssl.so.1.1 => /usr/local/lib64/libssl.so.1.1 (0x00007f48a2c45000) libcrypto.so.1.1 => /usr/local/lib64/libcrypto.so. 1.1 (0x00007f48a27a1000) @jww
qo'shib qo'ydi muallif fromthestone, manba

6 javoblar

OK, ba'zan tog'larga ko'tarilishni xohlagan vaqtingizda bazaga yordam bera olasizmi, yo'qmi, tekshirmasdan yuqori qismini qidirasiz ... Mening holatimda faqat LD_LIBRARY_PATH ni faqatgina kompilyatsiya qilishdan oldin eksport qildim.

export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64

va keyin

sudo ldconfig

(va keyingi safar ;-)) qayta tiklashdan keyin yo'lni saqlab qolish kerak;

6
qo'shib qo'ydi
bu erda ham xuddi shunga o'xshash bir masala issue # 1740
qo'shib qo'ydi muallif fromthestone, manba

Buni ko'ring:

ldd libssl.so   ->  libcrypto.so.1.1 => not found
sudo ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007f17d46c7000)
1
qo'shib qo'ydi
Systemwide/lib64ga simli aloqani ko'rsatib qo'yish yaxshi fikr emas, deb o'ylayman. Mening kamtarin fikrimcha, siz o'zingizning tizimingiz tomonidan boshqariladigan narsalar bilan siz mahalliylashtirgan narsalarni ajratish yaxshiroqdir
qo'shib qo'ydi muallif fromthestone, manba

Bunday holatda, siz OpenSSLni quyidagicha sozlashingiz kerak:

     

./ Linux-x86_64-enable-ec_nistp_64_gcc_128-ni sozlang   -Wl, -rpath =/usr/local/lib64 \ --prefix =/usr/local --openssldir =/usr/local OpenSSL odatda RPATH ni qo'shmaydi (ba'zi BSDslardan tashqari). Siz uni qo'lda belgilashingiz kerak   buyruqni sozlash. Agar qo'lda ko'rsatilsa, "adolatli" bo'ladi   LD_LIBRARY_PATH fokuslarisiz siz uchun "ishlaydi.

LD_LIBRARY_PATH ko'rsatmasangiz, men sizning maslahatingizga amal qildingiz, ammo baribir bu xato ishlamaydi ...

[[email protected] openssl-1.1.0e]$ export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64

[[email protected] openssl-1.1.0e]$ ldd /usr/local/bin/openssl 
    linux-vdso.so.1 =>  (0x00007ffc87aef000)
    /lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007f57511fa000)
    libssl.so.1.1 => /usr/local/lib/libssl.so.1.1 (0x00007f5750f8c000)
    libcrypto.so.1.1 => /usr/local/lib/libcrypto.so.1.1 (0x00007f5750ae8000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f57508cb000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f57506ae000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f57502ed000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f5751401000)
[[email protected] openssl-1.1.0e]$ openssl version
OpenSSL 1.1.0e  16 Feb 2017

Shunga qaramay LD_LIBRARY_PATH dan foydalanishim kerak Buning iloji yo'qmi, deb o'ylaymanki, bu oddiy yoki faqatgina ba'zi sabablarga ko'ra kompyuterimdagi noto'g'ri xatti-harakatlarim bilib ololmaydi ...

1
qo'shib qo'ydi
libssl.so.1.1 => /usr/local/lib/libssl.so.1.1 va libcrypto.so.1.1 => /usr/local/lib/libcrypto.so.1.1 /usr/local/lib kodiga emas, balki /usr/local/lib64 ga o'rnatayotganingizni bildiradi. Red Hat va Fedora kabi do'stlar o'yladim va CentOS kodi lib64 dan foydalangan. Buning o'rniga, -Wl, -rpath =/usr/local/lib dan foydalaning. Ehtimol, ldd keshini /sbin/ldconfig -p bilan ham chop etishingiz kerak. Kutilmagan narsa bo'lishi mumkin.
qo'shib qo'ydi muallif jww, manba
Lib64 dan foydalandim, chunki RH va do'stlar hamma joyda lib64 bilan ishlaydi
qo'shib qo'ydi muallif fromthestone, manba

1.0.2g dan 1.1.0 g gacha bo'lgan opensslni yangilashdan keyin biz bir xil muammolarga duch keldik. Kerakli kutubxonalar mavjud edi, shuningdek yumshoq aloqa mavjud edi.

sudo ldconfig 

biz uchun ishladi. ldconfig keshini qayta qurdi.

1
qo'shib qo'ydi

Konfiguratsiya:

 [mdm @ dev openssl-1.1.0e] $ ./Configure linux-x86_64 --prefix =/usr/local --openssldir =/usr/mahalliy
 
-ni tanlang

Bunday holda, siz OpenSSLni quyidagicha sozlashingiz kerak:

./Configure linux-x86_64 enable-ec_nistp_64_gcc_128 -Wl,-rpath=/usr/local/lib64 \
  --prefix=/usr/local --openssldir=/usr/local

OpenSSL sukut bo'yicha RPATH ni qo'shmaydi (ba'zi UXS-lardan tashqari). Konfiguratsiya buyrug'ida uni qo'lda ko'rsatishingiz kerak. Agar siz uni qo'lda ko'rsatgandan so'ng, siz uchun LD_LIBRARY_PATH hiyla-nayranglari keraksiz narsalar "faqat ishlaydi".

enable-ec_nistp_64_gcc_128 x86_64 uchun amal qiladi. Bu Diffie-Hellmanni 2x dan 4 soatgacha tezroq ishlaydi. Tanlovda ba'zi cheklovlar mavjud, shuning uchun uni ishlatganda ehtiyot bo'ling (lekin siz x86_64da xavfsizsiz).

Bundan tashqari, OpenSSL vikidagi Kuzatuv va o'rnatish ni ko'ring. RPATHlar muhokamasi va enable-ec_nistp_64_gcc_128 bilan muhokamalar mavjud.

0
qo'shib qo'ydi

Levitt tufayli, RenatoXSR

OpenSSL 1.1.0g uchun, CentOS 7.2.1511 uchun siz buni sinab ko'rishingiz mumkin.

sudo bash -c "echo '/usr/local/lib64' >> /etc/ld.so.conf"
sudo ldconfig

this link explains the cause of problem

RPATH foydalanish barqaror emas. Ba'zi tizimlarda ld.so RPATH'ni hatto LD_LIBRARY_PATH ga qarashdan oldin ko'rib chiqadi, bu esa, masalan, yangi OpenSSL tuzilishini sinovdan o'tkazishda (!) Qiyinchilik tug'diradi. Biz LD_PRELOADni buzgan holda oldingi 1.1.0 versiyalarida bunday qildik, ammo bunga rozi bo'lmagan ba'zi sanitizerlar mavjud, bu ham hayotni qiyinlashtiradi, masalan, yangi OpenSSL tuzilishini sinovdan o'tkazishda (!)

this link gave an solution example

0
qo'shib qo'ydi