Anyone successfully got php-sodium.x86_64 installed on AL8.7

AL8.7, cannot get php-sodium.x86_64 : Wrapper for the Sodium cryptographic library installed.

I’ve tried the remi stream php-8.2, still no luck.

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                                                   Stream                                                         Profiles                                                                     Summary
php                                                    remi-7.2                                                       common [d], devel, minimal                                                   PHP scripting language
php                                                    remi-7.3                                                       common [d], devel, minimal                                                   PHP scripting language
php                                                    remi-7.4                                                       common [d], devel, minimal                                                   PHP scripting language
php                                                    remi-8.0                                                       common [d], devel, minimal                                                   PHP scripting language
php                                                    remi-8.1                                                       common [d], devel, minimal                                                   PHP scripting language
php                                                    remi-8.2 [e]                                                   common [d], devel, minimal                                                   PHP scripting language


php --modules
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
readline
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Note, no sodium module.

Research on the php sodium seemed to point to that in mid 2022 the Redhat response is they do not and do not intend to support php sodium in the near future, they do not support the password hashing rhythm - so am I out of luck?

Have you try to install it ?

dnf install php-sodium

It fails to install, either from either stream, with lib_sodium library missing

  • nothing provides libsodium.so.23()(64bit) needed by php74-php-sodium-7.4.33-4.el8.remi.x86_64

    You can issue dnf search does return that php74-php-sodium-7.4.33-4.el8.remi.x86_64 is available, but fails when you do an install.

Switching repos makes no difference.

dnf module list php && php -value Updating Subscription Management repositories. Last metadata expiration check: 0:06:20 ago on Tue 14 Mar 2023 08:31:11 AM CDT. Remi's Modular repository for Enterprise Linux 8 - x86_64 Name Stream Profiles Summary php remi-7.2 common [d], devel, minimal PHP scripting language php remi-7.3 common [d], devel, minimal PHP scripting language php remi-7.4 common [d], devel, minimal PHP scripting language php remi-8.0 [e] common [d], devel, minimal PHP scripting language php remi-8.1 common [d], devel, minimal PHP scripting language php remi-8.2 common [d], devel, minimal PHP scripting language

Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Name Stream Profiles Summary
php 7.2 [d] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
php 8.0 common [d], devel, minimal PHP scripting language

Hint: [d]efault, [e]nabled, disabled, [i]nstalled
PHP 8.0.27 (cli) (built: Jan 3 2023 16:17:26) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.27, Copyright (c) Zend Technologies
with Zend OPcache v8.0.27, Copyright (c), by Zend Technologies

dnf search sodium
Updating Subscription Management repositories.
Last metadata expiration check: 0:06:36 ago on Tue 14 Mar 2023 08:31:11 AM CDT.
===================================================================================================================== Name & Summary Matched: sodium =====================================================================================================================
php-sodium.x86_64 : Wrapper for the Sodium cryptographic library
php56-php-pecl-libsodium.x86_64 : Wrapper for the Sodium cryptographic library
php70-php-pecl-libsodium.x86_64 : Wrapper for the Sodium cryptographic library
php70-php-pecl-libsodium2.x86_64 : Wrapper for the Sodium cryptographic library
php71-php-pecl-libsodium.x86_64 : Wrapper for the Sodium cryptographic library
php71-php-pecl-libsodium2.x86_64 : Wrapper for the Sodium cryptographic library
php72-php-pecl-libsodium.x86_64 : Wrapper for the Sodium cryptographic library
php72-php-sodium.x86_64 : Wrapper for the Sodium cryptographic library
php73-php-sodium.x86_64 : Wrapper for the Sodium cryptographic library
php74-php-sodium.x86_64 : Wrapper for the Sodium cryptographic library
php80-php-sodium.x86_64 : Wrapper for the Sodium cryptographic library
php81-php-sodium.x86_64 : Wrapper for the Sodium cryptographic library
php82-php-sodium.x86_64 : Wrapper for the Sodium cryptographic library


dnf install php-sodium.x86_64
Updating Subscription Management repositories.
Last metadata expiration check: 0:07:26 ago on Tue 14 Mar 2023 08:31:11 AM CDT.
Error:
Problem: cannot install the best candidate for the job

  • nothing provides libsodium.so.23()(64bit) needed by php-sodium-8.0.28-1.el8.remi.x86_64
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)


    dnf install php80-php-sodium.x86_64
    Updating Subscription Management repositories.
    Last metadata expiration check: 0:07:45 ago on Tue 14 Mar 2023 08:31:11 AM CDT.
    Error:
    Problem: cannot install the best candidate for the job
  • nothing provides libsodium.so.23()(64bit) needed by php80-php-sodium-8.0.28-1.el8.remi.x86_64
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

Have found a solution, I installed the epel repo, which seems to have pulled down lib_sodium, and I also installed php74-php-sodium.x86_64.

It seems your installation is now a mess, mixing php-* packages (modules) and php74-php-* packages (software collections).

See the repository FAQ

For a proper repository configuration and usage, simply follow the Wizard instructions which explain, among other things, that you need EPEL.

Notice: for Alma 9, php-sodium is part of EPEL, but only for PHP-8.0 from AppStream.
For other versions (Alma or PHP), it is only available in my repository.

1 Like

Yep, it’s.

I did disable the 7.4 streams and start-over, so everything is now on php-8, and `php80-php-sodium.x86_64, so it’s a little better.

Going forward, I will start out with Alma9, PHP-8.0 will be fine.

And thank you for the wizard link, what a great tool.