How To Install erlang-p1-pkix on Ubuntu 20.04
Introduction
In this tutorial we learn how to install erlang-p1-pkix
on Ubuntu 20.04.
What is erlang-p1-pkix
erlang-p1-pkix is:
The idea of the library is to simplify certificates configuration in Erlang programs. Typically an Erlang program which needs certificates (for HTTPS/ MQTT/XMPP/etc) provides a bunch of options such as certfile, chainfile, privkey, etc. The situation becomes even more complicated when a server supports so called virtual domains because a program is typically required to match a virtual domain with its certificate. If a user has plenty of virtual domains it’s quickly becoming a nightmare for them to configure all this. The complexity also leads to errors: a single configuration mistake and a program generates obscure log messages, unreadable Erlang tracebacks or, even worse, just silently ignores the errors. Fortunately, the large part of certificates configuration can be automated, reducing a user configuration to something as simple as:
certfiles:
- /etc/letsencrypt/live//.pem
The purpose of this library is to do this dirty job under the hood.
There are three methods to install erlang-p1-pkix
on Ubuntu 20.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 erlang-p1-pkix Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install erlang-p1-pkix
using apt-get
by running the following command:
sudo apt-get -y install erlang-p1-pkix
Install erlang-p1-pkix Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install erlang-p1-pkix
using apt
by running the following command:
sudo apt -y install erlang-p1-pkix
Install erlang-p1-pkix 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 erlang-p1-pkix
using aptitude
by running the following command:
sudo aptitude -y install erlang-p1-pkix
How To Uninstall erlang-p1-pkix on Ubuntu 20.04
To uninstall only the erlang-p1-pkix
package we can use the following command:
sudo apt-get remove erlang-p1-pkix
Uninstall erlang-p1-pkix And Its Dependencies
To uninstall erlang-p1-pkix
and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:
sudo apt-get -y autoremove erlang-p1-pkix
Remove erlang-p1-pkix Configurations and Data
To remove erlang-p1-pkix
configuration and data from Ubuntu 20.04 we can use the following command:
sudo apt-get -y purge erlang-p1-pkix
Remove erlang-p1-pkix configuration, data, and all of its dependencies
We can use the following command to remove erlang-p1-pkix
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge erlang-p1-pkix
References
Summary
In this tutorial we learn how to install erlang-p1-pkix
package on Ubuntu 20.04 using different package management tools: apt
, apt-get
and aptitude
.