cryptsetup: /lib/arm-linux-gnueabihf/libcryptsetup.so.12: version `CRYPTSETUP_2.4' not found error
Hi all,
I had to reinstall the OS on an old raspberry pi. (The new OS is Raspberry PI 32 bit OS, most recent version.)
I have installed cryptsetup-2.4.3 as described here: https://www.linuxfromscratch.org/blfs/view/svn/postlfs/cryptsetup.html. (It needed a bunch of dependencies which were also installed.)
Now when I try
$ sudo cryptsetup luksOpen /dev/sda1 backup
which is how it used to work, I get the error in the subject:
cryptsetup: /lib/arm-linux-gnueabihf/libcryptsetup.so.12: version `CRYPTSETUP_2.4' not found (required by cryptsetup)
apt claims that I have the newest version, v2.3.7:
$ apt search libcryptsetup Sorting... Done Full Text Search... Done libcryptsetup-dev/stable,now 2:2.3.7-1+deb11u1 armhf [installed] disk encryption support - development files
libcryptsetup12/stable,now 2:2.3.7-1+deb11u1 armhf [installed] disk encryption support - shared library
What am I missing? Thanks for any help.
Geza
On 04/04/2022 18:08, Geza Bohus wrote:
...
Quoted 1 line
I have installed cryptsetup-2.4.3 as described here:
...
Quoted 2 lines
apt claims that I have the newest version, v2.3.7:
Do you see the difference in versions?
You just cannot have old libcryptsetup with a new command line tool.
Either install everything from the distro repository, or install everything directly from upstream, but you cannot combine versions this way.
(Here new commandline tools depend on new API calls that are not in the old libceryptsetup.)
Better do not compile it yourself, use distro provided versions.
Milan
Hi Milan,
Thanks for your reply. Of course I saw the problem with the versions, I just don't understand how it can require a newer version than what apt claims to be the latest.
If I understand correctly, you're suggesting to do
sudo apt install cryptsetup
Right?
Thanks,
Geza
Quoted 20 lines · On 2022. April 4. at 18:26:56, Milan Broz ([email protected]…
On 04/04/2022 18:08, Geza Bohus wrote:
...Quoted 1 line
I have installed cryptsetup-2.4.3 as described here:
...
Quoted 2 lines
apt claims that I have the newest version, v2.3.7:
Do you see the difference in versions?
You just cannot have old libcryptsetup with a new command line tool.
Either install everything from the distro repository, or install everything directly from upstream, but you cannot combine versions this way.
(Here new commandline tools depend on new API calls that are not in the old libceryptsetup.)Better do not compile it yourself, use distro provided versions.
Milan
Quoted 7 lines · Geza Bohus
Thanks for your reply. Of course I saw the problem with the versions, I just don't understand how it can require a newer version than what apt claims to be the latest.
If I understand correctly, you're suggesting to do
sudo apt install cryptsetup
Basically, yes.
You have somewhere in PATH new cryptsetup tool, but in lib dir old libcryptsetup.
(If you installed it manually, it can by in various non-standard locations, so the best is check "which cryptsetup" (or "type -p cryptsetup") and remove it from there manually, then reinstall the version from your distribution.
Usually we are backward compatible, but it is really not a good idea to combine different version of libcryptsetup and cryptsetup.
(IOW what you see is the "correct" error caused by library symbols versioning to prevent a malfunction :-)
Milan
Got it, thank you.
G
Quoted 24 lines · On 2022. April 4. at 19:07:24, Milan Broz ([email protected]…
Quoted 7 lines · Geza Bohus
Thanks for your reply. Of course I saw the problem with the versions, I just don't understand how it can require a newer version than what apt claims to be the latest.
If I understand correctly, you're suggesting to do
sudo apt install cryptsetup
Basically, yes.
You have somewhere in PATH new cryptsetup tool, but in lib dir old libcryptsetup.
(If you installed it manually, it can by in various non-standard locations, so the best is check "which cryptsetup" (or "type -p cryptsetup") and remove it from there manually, then reinstall the version from your distribution.
Usually we are backward compatible, but it is really not a good idea to combine different version of libcryptsetup and cryptsetup.
(IOW what you see is the "correct" error caused by library symbols versioning to prevent a malfunction :-)
Milan