How To Install ruby-httpauth on Debian 10

Learn how to install ruby-httpauth on Debian 10 with this tutorial. ruby-httpauth is Ruby library for the HTTP authentication protocol (RFC 2617)

Introduction

In this tutorial we learn how to install ruby-httpauth on Debian 10.

What is ruby-httpauth

ruby-httpauth is:

HTTPauth is a library supporting the full HTTP Authentication protocol as specified in RFC 2617; both Digest Authentication and Basic Authentication.

HTTPAuth is built to be completely agnostic of the HTTP implementation. If you have access to your webserver’s headers you can use this library to implement authentication.

There are three methods to install ruby-httpauth on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install ruby-httpauth Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install ruby-httpauth

Install ruby-httpauth Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install ruby-httpauth

Install ruby-httpauth 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 Debian. Update apt database with aptitude using the following command.

sudo aptitude update

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

sudo aptitude -y install ruby-httpauth

How To Uninstall ruby-httpauth on Debian 10

To uninstall only the ruby-httpauth package we can use the following command:

sudo apt-get remove ruby-httpauth

Uninstall ruby-httpauth And Its Dependencies

To uninstall ruby-httpauth and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove ruby-httpauth

Remove ruby-httpauth Configurations and Data

To remove ruby-httpauth configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge ruby-httpauth

Remove ruby-httpauth configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge ruby-httpauth

Dependencies

ruby-httpauth have the following dependencies:

References

Summary

In this tutorial we learn how to install ruby-httpauth package on Debian 10 using different package management tools: apt, apt-get and aptitude.