2

Linux distribution : CentOS Linux release 7.4.1708 (Core)
Kernel : 3.10.0-693.2.2.el7.x86_64

The problem :

# 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)

While :

# 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
Erms
  • 123
  • 1
  • 3

2 Answers2

1

Seems the repective package is not installed. Check with # yum whatprovides libusb-1.0.so.0.

Most probably it will be solved by installing the below RPM:

# yum install libusb
0

the /lib directory might be ommited when looking for libraries. Try to put the line

/lib 

in /etc/ld.so.conf and then run

ldconfig -v

See if that helps

bocian85
  • 822
  • 5
  • 10
  • 2
    ldconfig -p : Print the lists of directories and candidate libraries stored in the current cache. – Erms Sep 19 '17 at 11:31
  • it does, but I wanted to deliberately skip the cache to be sure that the file is really there and ldconfig can read it, that's why i suggested the verbose flag instead – bocian85 Sep 19 '17 at 11:34