Skip to content
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

Compatibility issue when installing Crypt::NaCl::Sodium on Debian server #12

Open
SebastianStorb opened this issue Feb 3, 2024 · 1 comment

Comments

@SebastianStorb
Copy link

Compatibility issue when installing Crypt::NaCl::Sodium on Debian server

Description:
I'm trying to install the Perl module Crypt::NaCl::Sodium on my Debian server, but I'm running into compatibility issues with the libsodium library. The installation fails with several error messages indicating missing functions and constants in libsodium.

Installation attempt:

Command used: sudo cpanm Crypt::NaCl::Sodium
Error message: The most important errors relate to undefined identifiers such as crypto_stream_aes128ctr_NONCEBYTES, crypto_stream_aes128ctr_KEYBYTES and crypto_stream_aes128ctr.
System details:

Operating system: Debian 12 (latest version)

uname -mi
x86_64 unknown

Perl version: 5.036000
libsodium version: 1.0.19
Steps already taken:

Attempting to install via CPANminus.
Checking and uninstalling the current libsodium version.
Try to find and install an older version of libsodium that contains the required features.
Main problem:
The main problem seems to be that the required features (crypto_stream_aes128ctr_*) are not present in the current version of libsodium (1.0.19) and I'm having difficulty finding an older version of libsodium that includes these features.

Solution sought:
I'm looking for a way to either find and install a compatible version of libsodium or an alternative solution to successfully install Crypt::NaCl::Sodium on my Debian server.

I have tried the following without success:
sudo apt-get remove --purge libsodium-dev
wget http://archive.debian.org/debian/pool/main/libs/libsodium/libsodium18_1.0.11-2_amd64.deb
sudo dpkg -i libsodium18_1.0.11-2_amd64.deb
sudo cpanm Crypt::NaCl::Sodium

The solution mentioned in the forum and wiki doesn't work for me:

`cpan Crypt::NaCl::Sodium --force
...
make: *** [Makefile:367: Sodium.o] Fehler 1
AJGB/Crypt-NaCl-Sodium-1.0.8.0.tar.gz
/usr/bin/make -- NOT OK

(error): Could not expand [--force]. Check the module name.
(info): I can suggest names if you install one of Text::Levenshtein::XS, Text:: Levenshtein::Damerau::XS, Text::Levenshtein, and Text::Levenshtein::Damerau::PP
(info): and you provide the -x option on invocation.
(error): Skipping --force because I couldn't find a matching namespace.`

@mo22
Copy link

mo22 commented Feb 9, 2024

Can be solved by installing an older version of libsodium:

apt-get install git build-essential automake autoconf
git clone https://github.com/jedisct1/libsodium.git
cd libsodium
git checkout 1.0.13
./autogen.sh
./configure --with-pic
make
sudo make install

and then running sudo cpan -f Crypt::NaCl::Sodium again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants