skip to Main Content

I take a Magento project and when i run x debug I have an exception because libsodium is not installed then I went to install libsodium.
I then follow this tutorial https://lukasmestan.com/install-libsodium-extension-in-php7/ (because I have php 7.2 as it is a Magento project) and … it didn’t work out 🙁
When I do :

sudo pecl install -f libsodium  

I have the problem :

checking for libsodium… configure: error: Please install libsodium
ERROR: `/var/tmp/libsodium/configure –with-php-config=/bin/php-config’ failed

Do someone had the same problem ? I mean installing libsodium is what I want to do and for do that I need to install libsodium XD
If someone have a solution I would really be glad.
PS: in case of minus please let me know why so that I can improve my post

3

Answers


  1. Ok the solution was simple instead of looking on internet with useless installation process simply do :

     sudo yum --enablerepo=remi-php72 install php-sodium
    
    Login or Signup to reply.
  2. For CentOS: 8, PHP 7.3 to install php-sodium, use:

    dnf install php-sodium
    
    Login or Signup to reply.
    1. First check if it’s enabled or not.

    php -i | grep sodium

    1. If It returns nothing then run the following commands-

    sudo yum install libsodium libsodium-devel

    sudo pecl install libsodium

    Then it told ‘You should add "extension=sodium.so" to php.ini’.

    1. Open php.ini file and under "Dynamic Extensions" add

    extension=sodium

    Follow the step-1 it should return –

    sodium
    sodium support => enabled
    ...
    

    DONE! 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search