Once Installing Magento 2.4.x and getting below errors
Undefined constant Magento\Framework\Encryption\Adapter\SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES
Solution:: The following below steps need to follow
Step [1] – Open Apache config file (httpd-xampp.conf)
Path Location = D:\xampp\apache\conf\extra\httpd-xampp.conf
Step [2] – Go to Line Number 17 of file httpd-xampp.conf as below
LoadFile "D:/xampp/php/php8ts.dll"
LoadFile "D:/xampp/php/libpq.dll"
LoadFile "D:/xampp/php/libsqlite3.dll"
LoadModule php_module "D:/xampp/php/php8apache2_4.dll"
Step [3] – Load File Path “D:/xampp/php/libsodium.dll” at the end
LoadFile "D:/xampp/php/php8ts.dll"
LoadFile "D:/xampp/php/libpq.dll"
LoadFile "D:/xampp/php/libsqlite3.dll"
LoadModule php_module "D:/xampp/php/php8apache2_4.dll"
here need to file path as per step 4
Step [4] – After adding, finally added the line as below & restart Apache Server
LoadFile "D:/xampp/php/php8ts.dll"
LoadFile "D:/xampp/php/libpq.dll"
LoadFile "D:/xampp/php/libsqlite3.dll"
LoadModule php_module "D:/xampp/php/php8apache2_4.dll"
LoadFile "D:/xampp/php/libsodium.dll