How To Install libnacl-dev on Ubuntu 18.04

In this tutorial we learn how to install libnacl-dev on Ubuntu 18.04. libnacl-dev is High-speed software library for network communication

Introduction

In this tutorial we learn how to install libnacl-dev on Ubuntu 18.04.

What is libnacl-dev

libnacl-dev is:

NaCl (pronounced “salt”) is a new easy-to-use high-speed software library for network communication, encryption, decryption, signatures, etc. NaCl’s goal is to provide all of the core operations needed to build higher-level cryptographic tools. This package contains header and library files needed for software development that makes use of NaCl.

There are three methods to install libnacl-dev on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install libnacl-dev Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install libnacl-dev using apt-get by running the following command:

sudo apt-get -y install libnacl-dev

Install libnacl-dev Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install libnacl-dev using apt by running the following command:

sudo apt -y install libnacl-dev

Install libnacl-dev Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install libnacl-dev using aptitude by running the following command:

sudo aptitude -y install libnacl-dev

How To Uninstall libnacl-dev on Ubuntu 18.04

To uninstall only the libnacl-dev package we can use the following command:

sudo apt-get remove libnacl-dev

Uninstall libnacl-dev And Its Dependencies

To uninstall libnacl-dev and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove libnacl-dev

Remove libnacl-dev Configurations and Data

To remove libnacl-dev configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge libnacl-dev

Remove libnacl-dev configuration, data, and all of its dependencies

We can use the following command to remove libnacl-dev configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge libnacl-dev

References

Summary

In this tutorial we learn how to install libnacl-dev package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.