community/nut - main/libusb: Cannot load USB library (libusb-1.0.so) : file not found. USB search disabled.
Package Information
- Package name: nut - libusb
- Package version: nut-2.8.2-r0 - libusb-1.0.27-r0
- Alpine version: 3.20.0
- Alpine architecture: armv7
Summary
I'm not sure if the problem is with the nut
package or the libusb
package because the latter is a dependency on the former.
After install nut
and run nut-scanner
I get:
# nut-scanner
Cannot load USB library (libusb-1.0.so) : file not found. USB search disabled.
Cannot load SNMP library (libnetsnmp.so) : file not found. SNMP search disabled.
Cannot load XML library (libneon.so) : file not found. XML search disabled.
Cannot load NUT library (libupsclient.so) : file not found. NUT search disabled.
No start IP, skipping NUT bus (old connect method)
Scanning NUT simulation devices.
In /usr/lib
I have:
# ls -l /usr/lib/libusb*
lrwxrwxrwx 1 root root 19 Jun 16 18:41 /usr/lib/libusb-1.0.so.0 -> libusb-1.0.so.0.4.0
-rwxr-xr-x 1 root root 75064 Feb 1 19:42 /usr/lib/libusb-1.0.so.0.4.0
If I create a symbolic link from libusb-1.0.so
to libusb-1.0.so.0.4.0
:
# ln -s libusb-1.0.so.0.4.0 libusb-1.0.so
So that /lib/usb
looks like this:
# ls -l /usr/lib/libusb*
lrwxrwxrwx 1 root root 19 Jun 17 18:25 /usr/lib/libusb-1.0.so -> libusb-1.0.so.0.4.0
lrwxrwxrwx 1 root root 19 Jun 16 18:41 /usr/lib/libusb-1.0.so.0 -> libusb-1.0.so.0.4.0
-rwxr-xr-x 1 root root 75064 Feb 1 19:42 /usr/lib/libusb-1.0.so.0.4.0
Then nut-scanner
works as expected:
# nut-scanner
Cannot load SNMP library (libnetsnmp.so) : file not found. SNMP search disabled.
Cannot load XML library (libneon.so) : file not found. XML search disabled.
Cannot load NUT library (libupsclient.so) : file not found. NUT search disabled.
Scanning USB bus.
No start IP, skipping NUT bus (old connect method)
Scanning NUT simulation devices.
[nutdev-usb1]
driver = "usbhid-ups"
port = "auto"
vendorid = "051D"
productid = "0002"
product = "Back-UPS ES 700G FW:871.O4 .I USB FW:O4"
serial = "XXXXXXXXXXXX"
vendor = "APC"
# bus = "004"
# device = "002"
# busport = "001"
Steps to reproduce
Install package nut
on a fresh Alpine linux installation and run nut-scanner
:
# nut-scanner
Cannot load USB library (libusb-1.0.so) : file not found. USB search disabled.
Cannot load SNMP library (libnetsnmp.so) : file not found. SNMP search disabled.
Cannot load XML library (libneon.so) : file not found. XML search disabled.
Cannot load NUT library (libupsclient.so) : file not found. NUT search disabled.
No start IP, skipping NUT bus (old connect method)
Scanning NUT simulation devices.
Edited by Alejandro Ojeda Gutiérrez