Installing Safe_Vault

PART 2. Install the Sodium/Libsodium Library

In the following, I compile the Libsodium binaries, as an exercise, rather than using the pre-compiled binaries.

Open a shell and give the commands:

	git clone -b stable https://github.com/jedisct1/libsodium.git      # cloning the stable branch because the default, master branch generates many warnings
	
	cd libsodium
	
	./autogen.sh
	
	./configure
	
	make && make check
	
	sudo make install

The last step above installs the binaries to /usr/local/lib, which might not be part of your shared libraries (e.g., on Redhat derived distros). Fortunately, for Debian-derived distros you only need to run the following command to reload your libraries cache:

	sudo ldconfig

Run the following command to see if the new library is present:

	sudo ldconfig -p | grep libsodium

… whose output should include, in part (instead of nothing!):

	/usr/local/lib/libsodium.so

Now to install Sodiumoxide, which creates a Rust binding of Libsodium.

Give the commands:

	git clone https://github.com/dnaq/sodiumoxide.git
	
	cd sodiumoxide
	
	cargo build
	
	cargo test

If that last command contains only “ok” as the test results, and no error messages, then Libsodium is now available to your Rust compiler.