How To Install libc6-dev on Ubuntu 20.04

In this tutorial we learn how to install libc6-dev on Ubuntu 20.04. libc6-dev is GNU C Library GNU C Library

Introduction

In this tutorial we learn how to install libc6-dev on Ubuntu 20.04.

What is libc6-dev

libc6-dev is:

Contains the symlinks, headers, and object files needed to compile and link programs which use the standard C library. Task: ubuntustudio-video, ubuntu-mate-core, ubuntu-mate-desktop Original-Vcs-Browser: https://salsa.debian.org/glibc-team/glibc Original-Vcs-Git: https://salsa.debian.org/glibc-team/glibc.git Build-Essential: yes

Package: libc6-dev Architecture: amd64 Version: 2.31-0ubuntu9 Multi-Arch: same Priority: optional Section: libdevel Source: glibc Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: GNU Libc Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 19070 Provides: libc-dev Depends: libc6 (= 2.31-0ubuntu9), libc-dev-bin (= 2.31-0ubuntu9), linux-libc-dev, libcrypt-dev Suggests: glibc-doc, manpages-dev Conflicts: libc0.1-dev, libc0.3-dev, libc6.1-dev Breaks: binutils (« 2.26), binutils-gold (« 2.20.1-11), cmake (« 2.8.4+dfsg.1-5), gcc-4.4 (« 4.4.6-4), gcc-4.5 (« 4.5.3-2), gcc-4.6 (« 4.6.0-12), libhwloc-dev (« 1.2-3), libjna-java (« 3.2.7-4), liblouis-dev (« 2.3.0-2), liblouisxml-dev (« 2.4.0-2), libperl5.26 (« 5.26.1-3), make (« 3.81-8.1), pkg-config (« 0.26-1) Filename: pool/main/g/glibc/libc6-dev_2.31-0ubuntu9_amd64.deb Size: 2519944 MD5sum: d4868a13f87dfcdd80351a383e96e01b SHA1: 9bf156dff3b3713fd23c0c070bce867fe226a34e SHA256: adb78f38fb00c76af4384be7a4c5f41da242e05bea6b0483e03b7e0c86738477 Homepage: https://www.gnu.org/software/libc/libc.html Description-en: GNU C Library: Development Libraries and Header Files Contains the symlinks, headers, and object files needed to compile and link programs which use the standard C library. Task: ubuntustudio-video, ubuntu-mate-core, ubuntu-mate-desktop Build-Essential: yes

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

sudo apt-get -y install libc6-dev

Install libc6-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libc6-dev

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

sudo aptitude -y install libc6-dev

How To Uninstall libc6-dev on Ubuntu 20.04

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

sudo apt-get remove libc6-dev

Uninstall libc6-dev And Its Dependencies

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

sudo apt-get -y autoremove libc6-dev

Remove libc6-dev Configurations and Data

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

sudo apt-get -y purge libc6-dev

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

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

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

References

Summary

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