SOLVED [ALTPHP-661] PECL sodium conflict on alt-php 7.2 & 7.3

nullmem

Member
Jan 21, 2018
11
1
3
Austin, TX
cPanel Access Level
Root Administrator
I noticed this morning alt-php7X-pecl-ext atempted to update and failed the following error:

Code:
Transaction check error:
  file /opt/alt/php72/usr/lib64/php/modules/sodium.so from install of alt-php72-pecl-ext-1-32.el7.x86_64 conflicts with file from package alt-php72-sodium-7.2.13-1.el7.x86_64
  file /opt/alt/php73/usr/lib64/php/modules/sodium.so from install of alt-php73-pecl-ext-1-2.el7.x86_64 conflicts with file from package alt-php73-sodium-1:7.3.0-1.el7.x86_64
So I just decided to reinstall alt-php72 default group by doing this:

Code:
yum remove alt-php72*
yum groups mark remove alt-php
yum groupinstall alt-php
and it compleatly failed:

Code:
Transaction check error:
  file /opt/alt/php72/usr/lib64/php/modules/sodium.so conflicts between attempted installs of alt-php72-sodium-7.2.13-1.el7.x86_64 and alt-php72-pecl-ext-1-3
2.el7.x86_64
So I had to add alt-php72-pecl* to exclude in /etc/yum.conf in order to reinstall alt-php72. Is anyone else having this problem?
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
462
113
UK
cPanel Access Level
Root Administrator
Yes ! I have opened a support ticket to Cloudlinux but they have not replied yet (probably too much Christmas partying going on :( )

If I ever get a reply, and what they tell me to do works, I shall post instructions here.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
Hello,

CloudLinux published an alt-php update on DEC-12-2018 that included an update to libsodium:

Alt-PHP updated

As part of this update, it looks like the extension name "libsodium" changed to "sodium". However, the corresponding INI file was not updated to reflect this change. This leads to PHP errors like this:

PHP Startup: Unable to load dynamic library '/opt/alt/php70/usr/lib64/php/modules/libsodium.so' - /opt/alt/php70/usr/lib64/php/modules/libsodium.so: cannot open shared object file: No such file or directory in Unknown:0
CloudLinux case number ALTPHP-661 was published to address this issue:

Alt-PHP updated

However, it looks like this update results in YUM transaction errors, as noted in this thread's original post. CloudLinux is aware of the problem and is currently working on publishing an additional update to solve the issue.

In the meantime, the temporary workaround for the original issue is to modify "libsodium.so" to "sodium.so" in the /opt/alt/php$$/etc/php.d.all/libsodium.ini file, then update CageFS. Here's a command to do this:

Code:
sed -i -s "s/libsodium.so/sodium.so/" /opt/alt/php7*/etc/php.d.all/libsodium.ini ; cagefsctl --rebuild-alt-php-ini
Thank you.
 
Last edited:

rpvw

Well-Known Member
Jul 18, 2013
1,101
462
113
UK
cPanel Access Level
Root Administrator
@cPanelMichael the update you point to is the one currently causing the yum transaction error.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
Hi @rpvw,

CloudLinux is aware of the YUM transaction error with the recent release. They are planning to have this fixed with an additional update (ETA ~3 hours). I've updated my previous response to reflect this.

Thanks!
 

rpvw

Well-Known Member
Jul 18, 2013
1,101
462
113
UK
cPanel Access Level
Root Administrator
CloudLinux is aware of the YUM transaction error with the recent release.
I should hope so - This is what I opened a support ticket to them about 2 hours ago, and have been trying sets of commands that they gave me to no avail, and have just granted server access to them on their request !
 
  • Like
Reactions: cPanelMichael

rpvw

Well-Known Member
Jul 18, 2013
1,101
462
113
UK
cPanel Access Level
Root Administrator
These are the commands that eventually seemed to fix the issue:
Code:
yum remove alt-php*sodium
yum clean all; yum makecache
yum groupupdate alt-php
The above should produce:
Erased: alt-php72-sodium
Installed: libsodium-devel-1.0.16-1.el6.x86_64
Updated: alt-php72-pecl-ext-1-32.el6.x86_64
Updated: alt-php70-pecl-ext-1-50.el6.x86_64
Updated: alt-php71-pecl-ext-1-38.el6.x86_64
Updated: alt-php73-pecl-ext-1-2.el6.x86_64


You should try and run yum groupupdate alt-php and yum update after the installation to ensure there are not any rogue packages in your yum caches. (it should exit with a clean No packages in any requested group available to install or update and No Packages marked for Update and no errors)

Hope this helps
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
Hello,

The latest CloudLinux update is now available to solve this:

Alt-PHP updated

Thank you.