I'm running a Google Cloud server running Ubuntu 22.04. It's a typical LAMP stack (PHP is version 8.1.2). Some of the websites on the server are using Laravel 8.
I recently upgraded one of the websites to Laravel 9 and I received the following error:
Class 'Facade\Ignition\IgnitionServiceProvider' not found
From a little bit of research, apparently this is caused by a PHP extension Sodium missing.
If I run php -i | grep sodium
using a terminal I get:
PHP Warning: PHP Startup: Unable to load dynamic library 'sodium' (tried: /usr/lib/php/20210902/sodium (/usr/lib/php/20210902/sodium: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/sodium.so (/usr/lib/php/20210902/sodium.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
sodium
sodium support => enabled
libsodium headers version => 1.0.18
libsodium library version => 1.0.18
PWD => /home/thomasadam83/libsodium-stable
$_SERVER['PWD'] => /home/thomasadam83/libsodium-stable
I tried installing Sodium using:
sudo apt install php-sodium
And received the following response:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php-sodium
If I run any PHP commands form the terminal, the response starts with:
PHP Warning: PHP Startup: Unable to load dynamic library 'sodium' (tried: /usr/lib/php/20210902/sodium (/usr/lib/php/20210902/sodium: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/sodium.so (/usr/lib/php/20210902/sodium.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
I can't find any other posts with a similar issue and a working solution.
Any help would be appreciated!