There are 4 ways to resolve this issue.
I tried via ssh, but i use cPanel, so, if you are using cPanel you have to go to
WHM > Module Installers > “PHP PECL” Installer and make sure you have
tested on 2.4.2p1
There are 4 solutions to resolve this error on WINDOWS XAMPP.
One of the reason for this error is sodium extension not enabled in php.ini file, so we need to enable it and re-run install command in the command prompt.
Go to C:\xampp\php\php.ini, find "extension=sodium" in it and then remove semicolon from beginning of this line to enable PHP extensions sodium. Save the file.
Then restart Apache means stop and start Apache from the Xampp Control Panel.
If you want to see more solutions, click here.