Install Sodium on Linux.

Author
By Darío Rivera
Posted On in Linux

Sodium is a library that facilitates some cryptographic tasks, mainly used in UNIX operating systems and as an extension in some programming languages like PHP. Today we will see how to install Sodium in most UNIX systems.

The first thing you should do is find out what the latest version of Sodium is available in the official releases. As of today, the latest release is v1.0.18, so we should first download the Sodium source.

wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-stable.tar.gz

Once this is done, we must unzip the source and access the release folder.

tar -zxf libsodium-1.0.18-stable.tar.gz
cd libsodium-stable

The next step will be, as in any UNIX program that you download and compile, to run configure and make.

./configure --prefix=/usr
make && make check

At this point, you should get an output similar to the following:

============================================================================
Testsuite summary for libsodium 1.0.18
============================================================================
# TOTAL: 77
# PASS:  77
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

Once everything has been compiled, we can run it peacefully.

sudo make install
sudo ldconfig

And that's it!. See you next time.


Acerca de Darío Rivera

Author

Application Architect at Elentra Corp . Quality developer and passionate learner with 10+ years of experience in web technologies. Creator of EasyHttp , an standard way to consume HTTP Clients.

LinkedIn Twitter Instagram

Sólo aquellos que han alcanzado el éxito saben que siempre estuvo a un paso del momento en que pensaron renunciar.