Page 1 of 1

Trying to get smartmontools to install/work on Kirkstone

Posted: Fri Nov 29, 2024 3:59 pm
by Stogie

.
Hey guys. I've been trying to get the smartmontools Debian package (.DEB file) to work on Kirkstone. I've been successful in previous attempts to get .DEBs to install and work, but this one's giving me problems.

As usual I doubleclicked the .DEB file in Rox, it installed, then I run the executable (in this case, "smartctl") to see if it complains about missing stuff, then the idea is that I try to install the stuff it complains about. This method has worked in the past.

On first run, it complained about this:

Code: Select all

smartctl: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory

So I grabbed that file from elsewhere on my system (out of some flatpak directory), copied it into /usr/lib/, ran smartctl again, and got this complaint:

Code: Select all

smartctl: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /usr/lib/libselinux.so.1)

Searching the package manager PKGget for the string "GLIBC" shows that my Kirkstone has 2.35-r7 installed, not 2.38.

At this point I tried uninstalling the smartmontools package (the Bookworm version) and installing a older version of it (the Buster version) and got the exact same error message, which I then realized is because smartctl isn't asking for GLIBC 2.38, rather libselinux is asking for it instead, and libselinux isn't part of the smartmontools package at all.

So I don't know what to do now. Updating GLIBC, if could even figure out how to do it, seems risky, I guess I could put an earlier version of libselinux in /usr/lib, if I knew where/how to get it. Any ideas?

I could probably just boot into my old Easy Buster USB stick and install smartmontools with the normal package manager with no problems at all? That would be feasible because I only need to use this package once a month to health-check my hard drives. Or, I could make a new Easy Daedalus USB stick (which I should probably do anyway because it's reportedly awesome) and install it there.

This is why a Debian-based Easy is so fantastic, compared to OpenEmbedded. There's none of this manual B.S. and headaches to endure when installing software.


Re: Trying to get smartmontools to install/work on Kirkstone

Posted: Sat Nov 30, 2024 12:29 am
by BarryK

Yes, this glibc mismatch is a common problem when you install foreign packages.

The general rule is always install foreign packages that were compiled with an older version of glibc than the version in your host os.


Re: Trying to get smartmontools to install/work on Kirkstone

Posted: Sat Nov 30, 2024 8:13 am
by Caramel
Stogie wrote: Fri Nov 29, 2024 3:59 pm

.
Hey guys. I've been trying to get the smartmontools Debian package (.DEB file) to work on Kirkstone.

On first run, it complained about this:

Code: Select all

smartctl: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory

So I grabbed that file from elsewhere on my system (out of some flatpak directory), copied it into /usr/lib/, ran smartctl again, and got this complaint:

Code: Select all

smartctl: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /usr/lib/libselinux.so.1)

...

I then realized is because smartctl isn't asking for GLIBC 2.38, rather libselinux is asking for it instead, and libselinux isn't part of the smartmontools package at all.

...

You should try with libselinux.so.1 from the Debian package (https://packages.debian.org/bookworm/am ... 1/download)


Re: Trying to get smartmontools to install/work on Kirkstone

Posted: Sat Nov 30, 2024 1:52 pm
by thinkpadfreak

Hello.
This is a smartmontools package I have compiled on Kirkstone.

smartmontools-7.4-amd64.pet
https://drive.google.com/file/d/1NVGCM7 ... drive_link
md5sum 981c8f363065e51d790ca327c8771845

The executable is:
/usr/local/sbin/smartctl


Re: Trying to get smartmontools to install/work on Kirkstone

Posted: Sat Nov 30, 2024 8:08 pm
by Stogie
Caramel wrote:

You should try with libselinux.so.1 from the Debian package (https://packages.debian.org/bookworm/am ... 1/download)

Wow. That worked instantly. Downloaded that .DEB file, opened with Rox, agreed to the install. Went into a terminal, typed "smartctl" and now it works!

Thanks a lot! Also thanks thinkpadfreak, that package will be useful to folks who don't want to go through the long annoying trial-and-error process I had to go though!

I have four identical 2TB USB 3.2 external HDDs coming ($65 each on Amazon Black Friday deal, woohoo!), and I plan to keep the same data on them all and use rsync to keep them mirrored. Two onsite, two offsite (in case of fire or other disaster). Redundancy means never losing data again! Tools that can assess a drive's SMART (drive health) data are very important to run periodically, and now I can do that, thanks to your help! I'll look at each drive's SMART data weekly or monthly, to see when a drive may be about to fail in advance so I can be ready with a replacement.

Thanks again!