Skip to content

Libraries not found (Ubuntu 24.04 Server arm) #2431

Closed

Description

@sccfit

Hi all... just tried to install nut on fresh install Ubuntu 24 LTS on raspberry pi, installed fine but running sudo nut-scanner -C results in following:

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.

I switched to Ubuntu because the package in it is closer to current than RPI OS, and I need the tools to connect to identical UPS on one device. I've confirmed libusb-1.0 is installed, but for some reason nut can't find it, do I need to create extra symlinks or something like that?

Activity

  1. jimklimov commented on May 3, 2024

    @jimklimov
    Member

    Please retry with higher debug verbosity, e.g.:

    :; sudo nut-scanner -DDDDDD -C > /tmp/nutscan.log 2>&1
    

    There would be a huge wall of text about directories it looks into and file names it sees and tries to match there.

    I wonder if your system delivers e.g. libusb-1.0.so.1.27.0 and no symlink like libusb-1.0.so which could be in another package.

    For context: most of NUT deliverables can be split into packages based on dependencies (e.g. snmp, ipmi, usb etc. drivers) or purpose (client, cgi, ...) However the nut-scanner tool can optionally talk all protocols it can discover, and with usual shared object linking approach it would require all those libraries installed - even if the particular user never needs them (only got USB and has no care and footprint to spare for SNMP or IPMI libs). Instead, shared objects (libraries) are loaded dynamically by the program itself at its discretion - or skipped if the load failed, such as in this case. Why specifically it failed is the root cause to discover here.

  2. jimklimov commented on May 3, 2024

    @jimklimov
    Member

    Also, just in case: how did you install NUT (packages? custom build?) and which version?

  3. danmrossi commented on May 7, 2024

    @danmrossi

    Must be the OS that NUT was compiled on, I’ve just compiled and installed on Ubuntu 24.04 no issues.

  4. sccfit commented on May 17, 2024

    @sccfit
    Author

    Sorry, have been on holidays, looping back to this now. I'm not great with Linux/packages/github, I installed using apt which I believe should be version 2.8.1-3.1ubuntu2.

    Have run with higher debug verbosity, the following seem to be the most pertinent lines:

       0.001188     [D1]    Built-in:       /usr/lib/gcc/aarch64-unknown-linux-gnu
       0.001239     [D2] Looking for lib libusb-1.0.so in directory #0 : /usr/lib/aarch64-linux-gnu
    
       -- snip --
       
       0.012290     [D5] Comparing lib libusb-1.0.so with dirpath entry libusb-1.0.so.0
       0.012298     [D5] Comparing lib libusb-1.0.so with dirpath entry libusb-1.0.so.0.4.0
    
       -- snip --
       
       0.014574     [D1] Looking for lib libusb-1.0.so, found NULL
       
       -- snip --
       0.026829     [D1] nutscan_init: get_libname() did not resolve libname for LibUSB, trying to load it with libtool default resolver
       Cannot load USB library (libusb-1.0.so) : file not found. USB search disabled.
    

    Am I right in thinking that creating a symlink 'libusb-1.0.so' that points to 'libusb-1.0.so.0' in the same directory should resolve the issue in this case?

  5. jimklimov commented on May 17, 2024

    @jimklimov
    Member

    Yes, I wonder why one was not created in the first place (maybe devel packages deliver such a link, or some distro conventions had changed?) :\

    At least, not directly a NUT problem, or not sure quickly how to address such distro specifics in common codebase, short of adding a nut-scanner config file/options about such paths.

  6. jimklimov commented on May 17, 2024

    @jimklimov
    Member

    Hm, yeah, the name without trailing numbers seems to come from development packages:

    :; grep libusb-1.0.so /var/lib/dpkg/info/*.list
    /var/lib/dpkg/info/libusb-1.0-0-dev:amd64.list:/usr/lib/x86_64-linux-gnu/libusb-1.0.so
    /var/lib/dpkg/info/libusb-1.0-0:amd64.list:/usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0
    /var/lib/dpkg/info/libusb-1.0-0:amd64.list:/usr/lib/x86_64-linux-gnu/libusb-1.0.so.0
    

    Wondering how nobody stumbled on that before. Did everyone have a larger system footprint installed (e.g. did other packagings of NUT depend on *-dev packages of other stuff)?..

    At least, this does seem like something NUT codebase can address - beside the idea above for direct run-time modifiable configuration of file names/paths to use, it may be possible to add the name(s) of the library seen at configuration/build time (e.g. libusb-1.0.so.0 or resolved through all the symlinks to "real file" at libusb-1.0.so.0.3.0) to the built-in search list.

    I would be wary of just allowing random suffixes to be accepted in the search method; to that end, get_libname_in_dir() explicitly has checks to avoid "*.dll.a", ".so.1.2.3" etc. and only pick the specified file name exactly (notably, not all such names can even be shared objects that we would be able to dynamically load). Although that is still a clumsy option... "If we found nothing exactly, try again with random suffixes allowed and check by dlload()" but that IMHO is an attack waiting to happen :)

  7. added this to the 2.8.3 milestone on May 17, 2024
  8. jimklimov commented on May 17, 2024

    @jimklimov
    Member

    A practical search on a test system does use realpath() (where available) and practically use the ultimate file name when it looks at a symlink (which does exist):

       0.002097     [D5] Comparing lib libusb-1.0.so with dirpath entry libusb-1.0.so
       0.002108     [D2] Candidate path for lib libusb-1.0.so is /usr/lib/x86_64-linux-gnu/libusb-1.0.so (realpath /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0)
       0.002119     [D1] Looking for lib libusb-1.0.so, found /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0
       0.002121     [D1] nutscan_init: get_libname() resolved '/usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0' for LibUSB, loading it
       0.002324     [D1] nutscan_init: succeeded to load the library for LibUSB
    

    Looking at code, I see that for each library of interest, nut-scanner tries one or more patterns via get_libname() and if any of those fails to find an exact filename match in searched directories, it falls back to the likes of nutscan_load_usb_library() (half a dozen of those for different libs) which would try to lt_dlopen() the specified pattern(s) in hopes that the OS resolver would take care of locating the library in some location unexpected by NUT (and maybe under a slightly different name - up to the OS not NUT at this point). This is the part seen in your log too, as:

       0.026829     [D1] nutscan_init: get_libname() did not resolve libname for LibUSB, trying to load it with libtool default resolver
    
  9. jimklimov commented on May 17, 2024

    @jimklimov
    Member

    Running some experiments with another lib that is easier to fiddle with (NUT only built in this system, not installed into common paths, so its own libupsclient is not resolved via OS paths):

    :; ./tools/nut-scanner/nut-scanner -O
    Cannot load NUT library (libupsclient.so) : file not found. NUT search disabled.
    

    With the local build in the library path, it is seen:

    :; LD_LIBRARY_PATH="`pwd`/clients/.libs:$LD_LIBRARY_PATH" ./tools/nut-scanner/nut-scanner -O -DDDDDD 2>&1  | grep -B5 -A5 'libupsclient\.so\.'
    
    ...
       0.014299     [D5] Comparing lib libupsclient.so with dirpath entry libupsclient.so
       0.014308     [D2] Candidate path for lib libupsclient.so is /home/jim/nut/clients/.libs/libupsclient.so (realpath /home/jim/nut/clients/.libs/libupsclient.so.6.0.1)
       0.014312     [D2] Looking for lib libupsclient.so, found in LD_LIBRARY_PATH
       0.014313     [D1] Looking for lib libupsclient.so, found /home/jim/nut/clients/.libs/libupsclient.so.6.0.1
       0.014313     [D1] nutscan_init: get_libname() resolved '/home/jim/nut/clients/.libs/libupsclient.so.6.0.1' for NUT Client library, loading it
       0.014361     [D1] nutscan_init: succeeded to load the library for NUT Client library
    ...
    

    Removing the .so symlink out of the way:

    :; ls -la clients/.libs/libupsclient.so*
    lrwxrwxrwx 1 jim jim     21 May 15 17:35 clients/.libs/libupsclient.so -> libupsclient.so.6.0.1
    lrwxrwxrwx 1 jim jim     21 May 15 17:35 clients/.libs/libupsclient.so.6 -> libupsclient.so.6.0.1
    -rwxr-xr-x 1 jim jim 223376 May 15 17:35 clients/.libs/libupsclient.so.6.0.1
    
    :; mv clients/.libs/libupsclient.so{,.x}
    
    :; LD_LIBRARY_PATH="`pwd`/clients/.libs:$LD_LIBRARY_PATH" ./tools/nut-scanner/nut-scanner -O -DDDDDD 2>&1  | grep -B5 -A5 'libupsclient\.so\.'
    
    ...
       0.013544     [D2] Looking for lib libupsclient.so in directory #1 : /home/jim/nut/clients/.libs
       0.013569     [D5] Comparing lib libupsclient.so with dirpath entry libnutclient.so.2.0.2
       0.013586     [D5] Comparing lib libupsclient.so with dirpath entry libupsclient.a
       0.013588     [D5] Comparing lib libupsclient.so with dirpath entry upslog
       0.013589     [D5] Comparing lib libupsclient.so with dirpath entry libnutclientstub.la
       0.013590     [D5] Comparing lib libupsclient.so with dirpath entry libupsclient.so.6.0.1
       0.013591     [D5] Comparing lib libupsclient.so with dirpath entry libupsclient.exp
    ...
       0.013598     [D5] Comparing lib libupsclient.so with dirpath entry libupsclient.so.x
       0.013599     [D5] Comparing lib libupsclient.so with dirpath entry libnutclient.a
       0.013600     [D5] Comparing lib libupsclient.so with dirpath entry libnutclientstub.a
       0.013600     [D5] Comparing lib libupsclient.so with dirpath entry upsset.cgi
       0.013601     [D5] Comparing lib libupsclient.so with dirpath entry libupsclient.so.6
    ...
       0.013613     [D1] Got no strong candidate path for lib libupsclient.so in /home/jim/nut/clients/.libs, but saw seemingly related names (are you missing a symbolic link, perhaps?) e.g.: libupsclient.so.6.0.1
       0.013619     [D2] Looking for lib libupsclient.so in directory #2 : /usr/lib/x86_64-linux-gnu
    ...
    

    So it even recognizes that file, just not as a "strong" candidate.

  10. jimklimov commented on Jun 15, 2024

    @jimklimov
    Member

    As a side note, this may also be a concern for DMF effort (currently awaiting its destiny in another branch):

    ...
    Error loading Neon library required for DMF: libneon.so not found by dynamic loader; please verify it is in your /usr/lib or some otherwise searched dynamic-library path, under this exact name (maybe you just need a symlink?)
    Error loading Neon library required for DMF: libneon-gnutls.so not found by dynamic loader; please verify it is in your /usr/lib or some otherwise searched dynamic-library path, under this exact name (maybe you just need a symlink?)
    === DMF-Test: Error parsing data: -1
    
  11. added
    DMFNUT Data/Dynamic Mapping File/Format/Functionality feature
    on Jun 15, 2024
  12. 60 remaining items

  13. hanwin commented on Jun 14, 2025

    @hanwin

    This fixed helped me on Ubuntu 24.04's included 2.8.1 version of nut to get USB working.

    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
    

    From https://bookstack.bluecrow.net/books/linux/page/nut-network-ups-tools

    This solved the problem for me

  14. x-MrFloppy-x commented on Jun 18, 2025

    @x-MrFloppy-x

    @jimklimov : i just did a checkout from git and ran:

    ./autogen.sh
    ./configure --with-user=nut --with-group=nut
    make install-as-root
    

    during the configure i see

    checking for real path to -lusb-1.0 (re-parsed as libusb-1.0.so likely file name / -lusb-1.0 linker arg)... initially '/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libusb-1.0.so'
    checking for "real path" of '/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libusb-1.0.so'... '/usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0' (differs from input)
    /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0
    

    nut-scanner shows me this:

    XXX@YYYY:/tmp/nut# tools/nut-scanner/nut-scanner -U
    Network UPS Tools nut-scanner 2.8.3.464-464+g2dce981ef (development iteration after 2.8.3)
    
    NUT 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 via libupsclient).
    * Options for NUT devices (new avahi method) scan not enabled: library not detected.
      -n, --nut_simulation_scan: Scan for NUT simulated devices (.dev files in $CONFPATH).
    * 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).
    ...
    

    The symbolic links did not fix it for my installation.
    note:
    I'm new to nut and trying to get it to work on my proxmox instance with a new UPS that requires 2.8.3

  15. jimklimov commented on Jun 19, 2025

    @jimklimov
    Member

    @x-MrFloppy-x : What do other lines near the libusb detection say? Does the final report of configure script confirm it would use libusb? e.g. * build USB drivers: yes (libusb-1.0)?

    And just in case, what does/did ls -la /usr/lib/x86_64-linux-gnu/libusb-1.0.so* show - just the /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0 file and no symlinks (*.so, *.so.0)?

    In the help text it should report the library search paths it would explicitly look into, e.g.

    Note: many scanning options depend on further loadable libraries.
    Run-time loadable library search paths used by this build of NUT:
            Via LD_LIBRARY_PATH:    /usr/src/nut-pve/tools/nut-scanner/.libs
            NOTE: Reporting filtered (existing unique) built-in paths:
            Built-in:       /usr/local/ups/lib
            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-gnu
    

    Does yours include /usr/lib/x86_64-linux-gnu?

  16. x-MrFloppy-x commented on Jun 19, 2025

    @x-MrFloppy-x

    @jimklimov :
    you are right i missed the last occurence in the configure output:
    * build USB drivers: yes (libusb-1.0)

    XXX@YYYY:/tmp/nut# cat configure.log |grep usb
    checking for libusb-1.0 version via pkg-config... 1.0.26 found
    checking for libusb(-0.1) version via pkg-config... none found
    checking for libusb-config... no
    checking for libusb preferred version... 1.0.26 (libusb-1.0)
    checking for libusb cflags... -I/usr/include/libusb-1.0 
    checking for libusb ldflags... -lusb-1.0 
    checking for libusb.h... yes
    checking for libusb_init... yes
    checking for libusb_strerror... yes
    checking for libusb_kernel_driver_active... yes
    checking for libusb_set_auto_detach_kernel_driver... yes
    checking for libusb_detach_kernel_driver... yes
    checking for libusb_detach_kernel_driver_np... no
    checking for usb_detach_kernel_driver_np... no
    checking for libusb_get_port_number... yes
    checking for real path to -lusb-1.0 (re-parsed as libusb-1.0.so likely file name / -lusb-1.0 linker arg)... initially '/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libusb-1.0.so'
    checking for "real path" of '/usr/lib/gcc/x86_64-linux-gnu/12/../../../x86_64-linux-gnu/libusb-1.0.so'... '/usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0' (differs from input)
    /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0
    checking whether to build USB drivers... yes (libusb-1.0)
    checking whether to generate scripts/udev/nut-usbups.rules... yes
    checking whether to generate scripts/devd/nut-usb.conf... yes
    config.status: creating scripts/udev/nut-usbups.rules
    config.status: creating scripts/devd/nut-usb.conf
    * build USB drivers:    yes (libusb-1.0)
    

    my /usr/lib/x86_64-linux-gnu/ looks like this:

    XXX@YYYY:/tmp/nut# ls -la /usr/lib/x86_64-linux-gnu/libusb*       
    -rw-r--r-- 1 root root 215282 Apr 10  2022 /usr/lib/x86_64-linux-gnu/libusb-1.0.a
    lrwxrwxrwx 1 root root     19 Apr 10  2022 /usr/lib/x86_64-linux-gnu/libusb-1.0.so -> libusb-1.0.so.0.3.0
    lrwxrwxrwx 1 root root     19 Apr 10  2022 /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0 -> libusb-1.0.so.0.3.0
    -rw-r--r-- 1 root root 121936 Apr 10  2022 /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0
    

    From your comment i understood that it should find, and actualy does find, the librarys in /usr/lib/x86_64-linux-gnu/
    but i'm also puzzled why the nut-scanner reports * Options for USB devices scan not enabled: library not detected..
    So as i'm running proxmox on intel i might not be related to this issue here.

  17. jimklimov commented on Jun 19, 2025

    @jimklimov
    Member

    If you run nut-scanner with high debug verbosity it would print many screenfuls of information about the search for libraries before it does anything else (scan, show help, etc.)

    You can try e.g. nut-scanner -DDDDDD -U 2>&1 | less to keep those messages in the standard viewer, where it would be easier for you to search for mentions of libusb. It is possible it looked at valid candidates and discarded them for some reason (would say why), or did not look into the correct directory, etc.

    Proxmox should not be the problem, I have NUT running on PVE 7 and 8 - it is just Debian (or similar) as far as programs and packaging in the host-OS are concerned.

  18. jimklimov commented on Jun 19, 2025

    @jimklimov
    Member

    Example from a PVE here:

    root@pve:~# /usr/src/nut-pve/tools/nut-scanner/nut-scanner -DDDDDD -U 2>&1 | grep -B2 -A2 -i libusb
       0.000189     [D1]    Built-in:       /usr/lib/gcc/x86_64-pc-linux-gnu
       0.000190     [D1] nutscan_init: Parallel scan support: max_threads=512
       0.000193     [D3] get_libname('libusb-1.0.so.0.3.0'): Entering method...
       0.000197     [D4] get_libname: Looking for lib libusb-1.0.so.0.3.0 by path-set LD_LIBRARY_PATH_64...
       0.000199     [D3] get_libname_in_pathset('libusb-1.0.so.0.3.0', 19, '(null)', 0): Entering method...
       0.000200     [D4] get_libname: Looking for lib libusb-1.0.so.0.3.0 by path-set LD_LIBRARY_PATH...
       0.000201     [D3] get_libname_in_pathset('libusb-1.0.so.0.3.0', 19, '/usr/src/nut-pve/tools/nut-scanner/.libs', 0): Entering method...
       0.000203     [D4] get_libname_in_pathset: Looking for lib libusb-1.0.so.0.3.0 in a colon-separated path set
       0.000207     [D3] get_libname_in_dir('libusb-1.0.so.0.3.0', 19, '/usr/src/nut-pve/tools/nut-scanner/.libs', 0): Entering method...
       0.000214     [D4] get_libname_in_dir: Looking for lib libusb-1.0.so.0.3.0 in directory #0 : /usr/src/nut-pve/tools/nut-scanner/.libs
    ...
       0.000388     [D3] get_libname_in_dir('libusb-1.0.so.0.3.0', 19, '/usr/lib/x86_64-linux-gnu', 2): Entering method...
       0.000398     [D4] get_libname_in_dir: Looking for lib libusb-1.0.so.0.3.0 in directory #2 : /usr/lib/x86_64-linux-gnu
       0.000722     [D5] get_libname_in_dir: Comparing lib libusb-1.0.so.0.3.0 with dirpath entry .
       0.000725     [D5] get_libname_in_dir: Comparing lib libusb-1.0.so.0.3.0 with dirpath entry ..
       0.000726     [D5] get_libname_in_dir: Comparing lib libusb-1.0.so.0.3.0 with dirpath entry libpulse-simple.so.0
       0.000727     [D5] get_libname_in_dir: Comparing lib libusb-1.0.so.0.3.0 with dirpath entry libform.so.6
       0.000732     [D5] get_libname_in_dir: Comparing lib libusb-1.0.so.0.3.0 with dirpath entry libprofiler.so.0.5.5
    ...
       0.003844     [D5] get_libname_in_dir: Comparing lib libusb-1.0.so.0.3.0 with dirpath entry libusb-1.0.so.0.3.0
       0.003856     [D2] Candidate path for lib libusb-1.0.so.0.3.0 is /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0 (realpath /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0)
       0.003859     [D1] Looking for lib libusb-1.0.so.0.3.0, found /usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0
       0.003861     [D1] nutscan_init: get_libname() resolved '/usr/lib/x86_64-linux-gnu/libusb-1.0.so.0.3.0' for LibUSB, loading it
       0.004259     [D1] nutscan_init: succeeded to load the library for LibUSB
       0.004263     [D3] get_libname('libnetsnmp.so.40.0.0'): Entering method...
       0.004264     [D4] get_libname: Looking for lib libnetsnmp.so.40.0.0 by path-set LD_LIBRARY_PATH_64...
    ...
    

    so here it had a direct hit for the name resolved during build. Otherwise it would have retried with some other names (e.g. libusb.so), etc.

  19. x-MrFloppy-x commented on Jun 19, 2025

    @x-MrFloppy-x

    Thanks @jimklimov, that pointet me into the right direction, although not sure if this is expected behavior on pve.

    TLDR: an "apt install libusb-1.0-0-dev" solved my problems and i was able to build it and see my USB UPS with nut-scanner.

    My Error:
    I did fidle around a bit to much yesterday and it was obviously way beyond my bedtime ;-).
    I must have missed to make install-as-root after i saw the * build USB drivers: yes (libusb-1.0) output in the configure.

    discovered behavior on which i'm unsure if i should expected it:

    with the libusb-1.0-0-dev removed from the system i do get the following during the configure:

    XXX@YYYY:/tmp/nut# cat configure.log  |grep libusb
    checking for libusb-1.0 version via pkg-config... none found
    checking for libusb(-0.1) version via pkg-config... none found
    checking for libusb-config... no
    checking for libusb preferred version... none 
    checking for libusb cflags... 
    checking for libusb ldflags... -lusb
    

    so aperently i got the same behavior as this post above: (#2431 (comment))

  20. jimklimov commented on Jun 19, 2025

    @jimklimov
    Member

    With absent *-dev packages this is expected - they deliver the pkg-config metadata files and/or equivalent legacy modulename-config scripts, and headers, and shorter symlinks. While we try to not rely on the latter (since relatively recent fixes for this issue), we can't build without at least headers (the rest can be passed in other configure options).

    However your later post indicates pkg-config data for libusb-1.0 and headers were seen. Or was this after you installed *-dev?

  21. x-MrFloppy-x commented on Jun 19, 2025

    @x-MrFloppy-x

    @jimklimov

    However your later post indicates pkg-config data for libusb-1.0 and headers were seen. Or was this after you installed *-dev?

    Must be after installed the *-dev!
    I just retested 2 times and without *-dev the configure does not find the usblib!

    Thanls for your answers and the right questions!

  22. Craig-Powell commented on Oct 22, 2025

    @Craig-Powell

    Adding a related comment in case it helps someone in the future.

    Just tried installing nut on a Raspberry Pi 3B with the bone stock Raspberry Pi OS Lite, 64-bit trixie, 2025-10-01 build. The current nut packge for this is 2.8.1-5. Was able to see my USB attached UPS just fine but didn't like I was getting the following errors with nut-scanner:

    Cannot load SNMP library (libnetsnmp.so.40) : file not found. SNMP search disabled.
    Cannot load XML library (libneon.so.27) : file not found. XML search disabled.
    Cannot load AVAHI library (libavahi-client.so.3) : file not found. AVAHI search disabled.
    Cannot load IPMI library (libfreeipmi.so.17) : file not found. IPMI search disabled.
    

    Yeah, I could just use nut-scanner -U since my devices are all USB based but I still wanted to understand this. Following on clues from the thread I installed the related dev libraries:

    sudo apt install libsnmp-dev libneon27-dev libavahi-client-dev libfreeipmi-dev

    This now allows the run of nut-scanner to execute without errors. So while I didn't have to do this for my setup (at least not at this time) I think having this answer here can still be useful to the community depending on what keywords a user is searching for. I guess once the Raspberry Pi OS packages get updated to nut 2.8.3 or higher this will all be moot.

  23. jimklimov commented on Oct 22, 2025

    @jimklimov
    Member

    Thanks for the heads-up. Technically, nut-scanner is built this way to not depend on packages with those libraries so the required installation footprint is smaller, and the needed profile depends on the use-case (so drivers using those libs would be programs that require them; if you don't have say an SNMP UPS and so no need for that driver, you don't have to pull in the library to scan for your serial or USB UPS).

  24. hurricup commented on Nov 11, 2025

    @hurricup

    solved mine missingn usb library with sudo apt install libusb-1.0-0-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DMFNUT Data/Dynamic Mapping File/Format/Functionality featureLinuxSome issues are specific to Linux as a platformnut-scannerpackagingraspberry

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions