How To Install libbrotli-dev on Ubuntu 18.04

In this tutorial we learn how to install libbrotli-dev on Ubuntu 18.04. libbrotli-dev is library implementing brotli encoder and decoder (development files)

Introduction

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

What is libbrotli-dev

libbrotli-dev is:

Brotli is a generic-purpose lossless compression algorithm that compresses data using a combination of a modern variant of the LZ77 algorithm, Huffman coding and 2nd order context modeling, with a compression ratio comparable to the best currently available general-purpose compression methods. It is similar in speed with deflate but offers more dense compression.

This package installs development files.

There are three methods to install libbrotli-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 libbrotli-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 libbrotli-dev using apt-get by running the following command:

sudo apt-get -y install libbrotli-dev

Install libbrotli-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libbrotli-dev

Install libbrotli-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 libbrotli-dev using aptitude by running the following command:

sudo aptitude -y install libbrotli-dev

How To Uninstall libbrotli-dev on Ubuntu 18.04

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

sudo apt-get remove libbrotli-dev

Uninstall libbrotli-dev And Its Dependencies

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

sudo apt-get -y autoremove libbrotli-dev

Remove libbrotli-dev Configurations and Data

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

sudo apt-get -y purge libbrotli-dev

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

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

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

References

Summary

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