libreadline.so.6: cannot open shared object file 問題解決辦法

來源:互聯網
上載者:User

標籤:伺服器   centos   lvm   共用庫   

問題描述:在centos 6.4 上執行reboot命令之後,系統啟動失敗,不能串連。去伺服器機房,插上顯示器與鍵盤,螢幕給出報錯資訊如下:


“setting up logical volume management: /sbin/lvm : error while loading shared libraries: ibreadline.so.6:cannot open shared object file :no such file or directory”



解決辦法:

查看/lib/下的有可能有libreadline.so.6 ,可以做一個軟連結下載ncurses-5.6.tat.gz,進去編譯安裝。然後下載readline-5.2.tar.gz,解壓cd到其目錄執行一定要按照下面第順序,否則可能不成功。

$./configure --prefix=/usr --with-ncurses

$cd shlib

把Makefile裡的SHLIB_LIBS = 改為 SHLIB_LIBS = -lncurses

$make

$sudo make install

$cd ..

$make

$sudo make install

解決之後 用ldd命令探測 ldd /sbin/lvm

linux-vdso.so.1 =>  (0x00007fff3e7ff000)        libudev.so.0 => /lib64/libudev.so.0 (0x00000039b5c00000)        libdl.so.2 => /lib64/libdl.so.2 (0x00000039ad400000)        libdevmapper-event.so.1.02 => /lib64/libdevmapper-event.so.1.02 (0x00000039ad000000)        libdevmapper.so.1.02 => /lib64/libdevmapper.so.1.02 (0x00000039b7800000)        libreadline.so.6 => /usr/lib/libreadline.so.6 (0x00007fa8d90a0000)        libc.so.6 => /lib64/libc.so.6 (0x00000039acc00000)        /lib64/ld-linux-x86-64.so.2 (0x00000039ac800000)        libselinux.so.1 => /lib64/libselinux.so.1 (0x00000039ae800000)        libsepol.so.1 => /lib64/libsepol.so.1 (0x00000039b6800000)        libncurses.so.5 => /lib64/libncurses.so.5 (0x00000039ae400000)        libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00000039af400000)
發現 lvm命令依賴的共用庫 libreadline.so.6已經找到,問題解決,系統成功啟動。去/usr/lib路徑,發現libreadline.so的串連情況如下。
[[email protected] lib]# ll |grep libreadlrwxrwxrwx. 1 root root       16 2月  12 14:00 libreadline.so -> libreadline.so.6lrwxrwxrwx. 1 root root       18 2月  12 14:00 libreadline.so.6 -> libreadline.so.6.3-r-xr-xr-x. 1 root root   680132 2月  12 14:00 libreadline.so.6.3


參考文章:

CentOS 6.4中安裝JLink及出現問題解決

ldd命令介紹http://jingyan.baidu.com/article/1e5468f92c2f02484961b7c2.html

libreadline.so.6: cannot open shared object file 問題解決辦法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.