Assuming that you don't have build utils, php7 devtools, git, pear&pecl, composer (fresh install)
- Get build utils
sudo apt-get install build-essential
- Get php7.0-dev
sudo apt-get install php7.0-dev
Or php7.1-dev/php7.2-devsudo apt-get install php7.1-dev
sudo apt-get install php7.2-dev
- Git (good)
sudo apt-get install git
- Get libsodium
# Clone the libsodium source tree & Build libsodium, perform any defined tests, install libsodium
git clone -b stable https://github.com/jedisct1/libsodium.git && cd libsodium && ./configure && make check && make install
- Get PEAR & PECL
sudo apt-get install pear
- Install libsodium from PECL
pecl install libsodium
(orpecl install -f libsodium-2.0.8
according to comments) - Get straight to /etc/php/<PHP_VERSION>/mods-available/ and make a
libsodium.ini
file (Where <PHP_VERSION> is 7.0 or 7.1 or 7.2) - Write down
extension=libsodium.so
(orsodium.so
according to comments) inlibsodium.ini
& save (Yes, it works like this now, no more php.ini bs) - Enable the libsodium mod
sudo phpenmod libsodium
- Reload PHP
sudo /etc/init.d/apache2 restart && service php7.0-fpm restart
- Check for libsodium with
php -m
- Get composer
sudo apt-get install composer
- Navigate to your php project folder and install halite
composer require paragonie/halite
- Done