Ubuntu 22.04 up to date PHP8.2
I get this Warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'sodium' (tried: /usr/lib/php/20190902/sodium (/usr/lib/php/20190902/sodium: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/sodium.so (/usr/lib/php/20190902/sodium.so: undefined symbol: _array_init)) in Unknown on line 0
How can I resolve it?
I checked the following things:
apt install php-sodium
say it is allready installed
php -m | grep sodium
say is installed
phpinfo show it too
The solution for me was pretty simple:
I had to delete the old php Versions
apt purge php7.4* php8.0* php8.1*
After that no more errors will be shown.