Linux

為什麼程序 lsusb 找不到共享庫 libusb-1.0.so.0?

  • December 1, 2017

Linux 發行版:CentOS Linux 發行版 7.4.1708(核心)

核心:3.10.0-693.2.2.el7.x86_64

問題 :

# lsusb
lsusb: error while loading shared libraries: libusb-1.0.so.0: cannot open shared object file: No such file or directory

# ldd /usr/bin/lsusb
linux-vdso.so.1 =>  (0x00007ffd446e0000)
libusb-1.0.so.0 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f3cb0b14000)
/lib64/ld-linux-x86-64.so.2 (0x000055cb87a1b000)

儘管 :

# ldconfig -p | grep libusb-1.0.so.0
       libusb-1.0.so.0 (libc6) => /lib/libusb-1.0.so.0

# ls -als /lib/libusb*
 0 lrwxrwxrwx. 1 root root    19 Sep 16 10:13 /lib/libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
100 -rwxr-xr-x. 1 root root 98420 Nov  5  2016 /lib/libusb-1.0.so.0.1.0

似乎沒有安裝相應的軟體包。檢查 # yum whatprovides libusb-1.0.so.0。

很可能它會通過安裝以下 RPM 來解決:

# yum install libusb

查找庫時可能會省略 /lib 目錄。試著把線

/lib 

在**/etc/ld.so.conf** 然後執行

ldconfig -v

看看有沒有幫助

引用自:https://serverfault.com/questions/874380