Libreadline. so.6: cannot open shared object file solution, cannotopenfile

Source: Internet
Author: User

Libreadline. so.6: cannot open shared object file solution, cannotopenfile

Problem description: After the reboot command is executed on centos 6.4, the system fails to start and cannot be connected. Go to the server room, plug in the monitor and keyboard, and the screen displays the following error information:


“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”



Solution:

Check that there may be libreadline. so.6 under/lib/. You can download ncurses-5.6.tat.gz with a soft link to compile and install it. Download readline-5.2.tar.gz and decompress the cd file to its directory in the following sequence. Otherwise, it may fail.

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

$ Cd shlib

Change SHLIB_LIBS = in Makefile to SHLIB_LIBS =-lncurses.

$ Make

$ Sudo make install

$ Cd ..

$ Make

$ Sudo make install

Then, use the ldd command to test ldd, sbin, and 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)
The sharing library libreadline. so.6 on which the lvm command depends has been found. The problem is solved and the system is started successfully. Go to the/usr/lib path and find the connection of libreadline. so as follows.
[Root @ dhy lib] # ll | grep libreadlrwxrwxrwx. 1 root 16 February 12 14:00 libreadline. so-> libreadline. so.6lrwxrwxrwx. 1 root 18 February 12 14:00 libreadline. so.6-> libreadline. so.6.3-r-xr-x. 1 root 680132 February 12 14:00 libreadline. so.6.3


References:

Install JLink in CentOS 6.4 and solve problems

Ldd commands introduction http://jingyan.baidu.com/article/1e5468f92c2f02484961b7c2.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.