How To Install zlibc on Ubuntu 20.04

In this tutorial we learn how to install zlibc on Ubuntu 20.04. zlibc is An on-fly auto-uncompressing C library

Introduction

In this tutorial we learn how to install zlibc on Ubuntu 20.04.

What is zlibc

zlibc is:

Zlibc is a preloadable shared library that allows executables to uncompress the data files that they need on the fly. No kernel patch, no recompilation of these executables and no recompilation of the libraries is needed.

There are three methods to install zlibc 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 zlibc Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install zlibc

Install zlibc Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install zlibc using apt by running the following command:

sudo apt -y install zlibc

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

sudo aptitude -y install zlibc

How To Uninstall zlibc on Ubuntu 20.04

To uninstall only the zlibc package we can use the following command:

sudo apt-get remove zlibc

Uninstall zlibc And Its Dependencies

To uninstall zlibc and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove zlibc

Remove zlibc Configurations and Data

To remove zlibc configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge zlibc

Remove zlibc configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge zlibc

References

Summary

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