-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Libraries not found (Ubuntu 24.04 Server arm) #2431
Comments
Please retry with higher debug verbosity, e.g.:
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. 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 |
Also, just in case: how did you install NUT (packages? custom build?) and which version? |
Must be the OS that NUT was compiled on, I’ve just compiled and installed on Ubuntu 24.04 no issues. |
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:
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? |
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 |
Hm, yeah, the name without trailing numbers seems to come from development packages:
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. I would be wary of just allowing random suffixes to be accepted in the search method; to that end, |
A practical search on a test system does use
Looking at code, I see that for each library of interest,
|
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
With the local build in the library path, it is seen:
Removing the
So it even recognizes that file, just not as a "strong" candidate. |
As a side note, this may also be a concern for DMF effort (currently awaiting its destiny in another branch):
|
Same issue here, with Alpine Linux: https://gitlab.alpinelinux.org/alpine/aports/-/issues/16216 The libusb package only provides:
The libusb-dev package provides:
Maybe a regression of this old issue #233 |
Thanks for confirming this is more wide-spread ;( and also on the radar for so long... |
This patch seems to work: --- a/common/common.c
+++ b/common/common.c
@@ -3282,6 +3282,8 @@ static char * get_libname_in_dir(const char* base_libname, size_t base_libname_l
if (libname_alias) {
if (!libname_path) {
+ if (libname_alias[base_libname_length] == '.')
+ return libname_alias;
upsdebugx(1, "Got no strong candidate path for lib %s in %s"
", but saw seemingly related names (are you missing"
" a symbolic link, perhaps?) e.g.: %s", I am not certain if it is robust though. |
My concern would be about picking a somewhat random library this way. Say I'm more in favor of:
|
Well, that is kind of already the case since there is no guarantee where the |
…etworkupstools#2431] Signed-off-by: Jim Klimov <[email protected]>
…* for nut-scanner third-party libs [networkupstools#2431] libavahi, libfreeipmi, libneon, libnetsnmp, libusb0/1 NOTE: The libnutclient is separate, we build it - so can not detect the final name in advance right here Signed-off-by: Jim Klimov <[email protected]>
Seems to work, even on a Mac:
|
Waiting for a release 😄 |
…ly the client library [networkupstools#2431] Signed-off-by: Jim Klimov <[email protected]>
Me too, wondering when it's going to be released :) Is it possible to install it on ubuntu with sudo apt install nut or do I need to compile it my self? |
Currently we do not make snapshot packages (the idea is in backlog though), so your best shot for the latest and greatest features (and mishaps) is https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests |
…sl file name patterns into the loop [networkupstools#2431] Signed-off-by: Jim Klimov <[email protected]>
…ath_lib.m4: move definition of SOEXT to the header [networkupstools#2431] This would allow the multiplatform-aware library-picking logic to be used elsewhere (e.g. DMF) eventually. Signed-off-by: Jim Klimov <[email protected]>
…nt [networkupstools#2511, networkupstools#2431, networkupstools#2450 et al] Earlier bump went to "patch" component, but here we actually have an API expansion (and more exported symbols), so the more important component should be bumped. Signed-off-by: Jim Klimov <[email protected]>
…nt-version.h from libtool information file [networkupstools#2431] Signed-off-by: Jim Klimov <[email protected]>
….adoc: use client/libupsclient-version.h for SOFILE_LIBUPSCLIENT/SOPATH_LIBUPSCLIENT [networkupstools#2431] Signed-off-by: Jim Klimov <[email protected]>
…ixing backticks and double-quotes (upsets ksh) [networkupstools#2431] Signed-off-by: Jim Klimov <[email protected]>
With #2532 in place, it seems all reasonable goals of this issue have been achieved. |
So what was the final verdict on a fix for this? I just tried installing nut on a new Mint 22 install and got the same error. Is the above listed commit the fix itself, and the version including the fix just isn't included in Mint's apt repo? If that's the case, does nut happen to have a ppa that can be enabled for installing newer versions, or is compiling the only option? |
Currently, to get recent changes (master branch; the recent change above is not part of any numbered release yet) custom-compiling is the only official option; the https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests page (and docs it references) should help navigate through this. Another matter is that Debian-like OSes share the recipes and many of those are several NUT releases behind the actual publications. So if your distro serves something older than 2.8.2 (still without this fix, but generally speaking), for current NUT you might be better served by their "experimental" repos or custom builds as well. There is a backlogged effort to import several packaging recipes (some pioneered in FTY fork and branch, queued per #1316) and to publish the resulting snapshot packages whether with our NUT CI farm or using the OBS per #1209. The plan seems clear, but it just was not yet addressed. Too many efforts, too few people :-\ |
Any updates on this. Just installed today on Ubuntu and got the same issue: Linux data 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux "Ubuntu 24.04.1 LTS" nut-scanner |
See above. |
I guess I am also missing where the fix is for this. I didn't have problems a couple months ago when I installed this on a Pi but now that I am trying to do it on a Ubuntu installation I'm getting the same as the above, no matter how I install it. Can someone in a bit more detail explain what needs to be done to get this to work? The article linked above is a bit vague about how to get this working and seems to be more a general piece about packaging this. |
As a quick hotfix, ensure the filenames that your build of |
This workaround enabled my nut-scanner to recognise the SNMP library.
|
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:
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?
The text was updated successfully, but these errors were encountered: