Skip to main content

NUT - Network UPS Tools

Ubuntu 24.04 Issues

Out of the box, you receive the following errors when running nut-scanner:

$ nut-scanner -U
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 AVAHI library (libavahi-client.so) : file not found. AVAHI search disabled.
Cannot load IPMI library (libfreeipmi.so) : file not found. IPMI search disabled.
Cannot load NUT library (libupsclient.so) : file not found. NUT search disabled.
nut-scanner : utility for detection of available power devices.

OPTIONS:
  -C, --complete_scan: Scan all available devices except serial ports (default).
* Options for USB devices scan not enabled: library not detected.
* Options for SNMP devices scan not enabled: library not detected.
* Options for XML/HTTP devices scan not enabled: library not detected.
  -O, --oldnut_scan: Scan NUT devices (old method).
* Options for NUT devices (avahi method) scan not enabled: library not detected.
* Options for IPMI devices scan not enabled: library not detected.
  -E, --eaton_serial <serial ports list>: Scan serial Eaton devices (XCP, SHUT and Q1).
  -T, --thread <max number of threads>: Limit the amount of scanning threads running simultaneously (default: 512).

Note: many scanning options depend on further loadable libraries.
Run-time loadable library search paths used by this build of NUT:
	NOTE: Reporting filtered (existing unique) built-in paths:
	Built-in:	/usr/lib/x86_64-linux-gnu
	Built-in:	/usr/lib64
	Built-in:	/usr/lib
	Built-in:	/usr/local/lib
	Built-in:	/usr/lib/gcc/x86_64-linux-

The only issue I could find posted was Libraries not found (Ubuntu 24.04 Server arm) #2431, yet it didn't seem to have a resolution. I haven't read every bit of the issue, but the root of cause is pretty obvious that some package is no longer providing the symlinks that are expected to exist.

The easy solution is to create symlinks for the files its looking for to the files that actually exist.

pushd /usr/lib/x86_64-linux-gnu/
sudo ln -s libusb-1.0.so.0 libusb-1.0.so
sudo ln -s libnetsnmp.so.40 libnetsnmp.so
sudo ln -s libavahi-client.so.3 libavahi-client.so
sudo ln -s libfreeipmi.so.17 libfreeipmi.so
sudo ln -s libneon-gnutls.so.27 libneon.so
popd

After creating the symlinks, everything is working like a champ.

 

 

CyberPower CP1000PFCLCDa UPS Configuration

 

# /etc/nut/nut.conf
MODE=standalone
#MODE=netserver

 

# /etc/nut/ups.conf
maxretry = 3

# use "nut-scanner -U" to scan for connected UPS's

[cyberpower1]
        driver = "usbhid-ups"
        port = "auto"
        vendorid = "0764"
        productid = "0601"
        product = "CP1000PFCLCDa"
        serial = "CX1KP2001248"
        vendor = "CPS"
        bus = "001"
        pollinterval = 15

 

# /etc/nut/upsd.conf
LISTEN 0.0.0.0 3493

 

# /etc/nut/upsd.users

[monuser]
  password = REDACTED
  admin master

 

# /etc/nut/upsmon.conf
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 25
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

 

 

-end