cancel
Showing results for 
Search instead for 
Did you mean: 

Required libsodium upgrade for latest Magento release

lkrell
New Contributor

In the upcoming release for Magento Open Source and Commerce v2.3.2, we are upgrading our security encryption, requirements, and configurations. To prepare for these security updates, Magento instances require a modern, secure version of libsodium.

 

To install or upgrade to the latest version of Magento v2.3.2+, installations require libsodium version 1.0.13 or later prior to Magento installation. These versions support stronger encryption functions with specific compatible versions supported by our new release.

 

Install libsodium

 

To install and update your Magento instance, we recommend following libsodium documentation. You can locate installations from the libsodium GitHub repository, with complete release notes and packages.

 

Magento Commerce Cloud customer environments will be automatically updated to require newer libsodium versions (1.0.13+) after the latest Magento version releases.

 

Magento Release Notes

 

For complete release notes and information, see Magento Open Source and Commerce release notes. Content will publish with the release. For more information on the latest release, see this DevBlog.

7 Comments
jackJackDe
M1 Certified

Is it really required or only an additional solution? In my opinion, most hoster doesn’t support libsodium at default.

lkrell
New Contributor

Hello, thanks for the question! According to investigations here, it is required to update lisodium prior to installs and upgrades for 2.3.2. Versions and links in the devblog.

grafzahl io
Senior Member

For all who need a quick fix for this issue. In short, execute the following to install libsodium for PHP:

wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz \
    && tar xfvz libsodium-1.0.18.tar.gz \
    && cd libsodium-1.0.18 \
    && ./configure \
    && make && make install \
    && pecl install -f libsodium

The long answer can be found here http://blog.grafzahl.io/magento-warning-after-updating-to-2-3-2/

If anybody is interested in an ready-to-use dockerfile for magento2.3.2 including a working libsodium installation. Just send me a message.

tonyneocre
Senior Member

Thanks for that @grafzahl io 

 

Worked on mine:

root@f87222afc0bd:/libsodium-1.0.18# php -i | grep sodium
Configure Command =>  './configure'  '--build=x86_64-linux-gnu' '--with-config-file-path=/usr/local/etc/php' '--with-config-file-scan-dir=/usr/local/etc/php/conf.d' '--enable-option-checking=fatal' '--with-mhash' '--enable-ftp' '--enable-mbstring' '--enable-mysqlnd' '--with-password-argon2' '--with-sodium=shared' '--with-curl' '--with-libedit' '--with-openssl' '--with-zlib' '--with-libdir=lib/x86_64-linux-gnu' 'build_alias=x86_64-linux-gnu'
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,
sodium
sodium support => enabled
libsodium headers version => 1.0.18
libsodium library version => 1.0.18
PWD => /libsodium-1.0.18
$_SERVER['PWD'] => /libsodium-1.0.18
$_ENV['PWD'] => /libsodium-1.0.18
root@f87222afc0bd:/libsodium-1.0.18#

 

Here's a curl version of the same thing if you're basing your docker image on the core php:7.2 offical docker image (and don't want to install wget)

 

curl -O https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz \
&& tar xfvz libsodium-1.0.18.tar.gz \
&& cd libsodium-1.0.18 \
&& ./configure \
&& make && make install \
&& pecl install -f libsodium

 

vishal_2811
M1 Certified

Hi,

I am trying with Magento2.3.2 on AWS EC2 instance.

 

Initially while installing it always (6-7 times) hung at 67% later based on googling I fixed some configuration in php.ini and it moved ahead 67% but again hung at 99% stating something like "error in creating admin.." and threw some "sodiumException". Tried googling again and installed some sodium package and finally, it got installed... thank GOD.

 

Later I tried to set the deployment mode at my magento root, like below

ubuntu@ip-172-31-2-8:/var/www/html/magento232$ php bin/magento dep:mo:set developer

but I get below error all the time (doesn't matter what CLI command I run).

There are no commands defined in the "dep:mo" namespace.

Can you please suggest in this regard? I was not aware that the latest version of Magento 2.3.2 is really head-scratching.

 

I am having below version installed Php7.2.19, MySql5.7.27, Apache2.4.29, Node10.16.3, Composer1.6.3.

 

Thanks in advance.

Anonymous
Not applicable
did you run the installer again? if so please run bin/magento without any command to see what commands are available in the first place. Good luck!
vishal_2811
M1 Certified

nothing worked Smiley Sad

even admin is broken and says "Not found" Smiley Sad

used below also at my magento root, as a result it got installed in my magento root dir

wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz \
    && tar xfvz libsodium-1.0.18.tar.gz \
    && cd libsodium-1.0.18 \
    && ./configure \
    && make && make install \
    && pecl install -f libsodium

magento 2.3.x has many issues in installation ... i tried with 2.3.2 then came down to 2.3.1 both have same issues ... i have 777 permission recursively to pub, var, generated, app/etc.

once i set developer mode through CLI command it always say like "var/cache" or sometimes "generated/code" etc not writable (though i already given permission 777 recursively) ... not sure how writable permissions are removed?

once i run "php bin/magento list" on magento root in ubuntu it throws error like

In ServiceManager.php line 1130:

  An abstract factory could not create an instance of magentosetupconsolecommandbackupcommand(alias: Magento\Setup\Console\Command\
  BackupCommand).


In ServiceManager.php line 941:

  An exception was raised while creating "Magento\Setup\Console\Command\BackupCommand"; no instance returned


In Generator.php line 135:

  Can't create directory /var/www/html/magento232/generated/code/Magento/Framework/App/MaintenanceMode/.
  Class Magento\Framework\App\MaintenanceMode\Interceptor generation error: The requested class did not generate properly, because
  the 'generated' directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the '
  generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generate
  d class object to the signature of the related construct method, only.

Not sure which ghost is doing so? Really Magento 2.3.x installation on ubuntu 18.04 is becoming so head-scratching for me... and dont know why it's so weird? ....... I am having below version installed Php7.2.19, MySql5.7.27, Apache2.4.29, Node10.16.3, Composer1.6.3.

 

can anyone please help?