How To Install libldap2-dev on Ubuntu 20.04

In this tutorial we learn how to install libldap2-dev on Ubuntu 20.04. libldap2-dev is OpenLDAP development libraries OpenLDAP development libraries OpenLDAP development libraries

Introduction

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

What is libldap2-dev

libldap2-dev is:

This package allows development of LDAP applications using the OpenLDAP libraries. It includes headers, libraries and links to allow static and dynamic linking.

Package: libldap2-dev Architecture: amd64 Version: 2.4.49+dfsg-2ubuntu1.7 Multi-Arch: same Priority: extra Section: libdevel Source: openldap Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian OpenLDAP Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1466 Provides: libldap-dev Depends: libldap-2.4-2 (= 2.4.49+dfsg-2ubuntu1.7) Conflicts: libldap-dev, libopenldap-dev Replaces: libopenldap-dev Filename: pool/main/o/openldap/libldap2-dev_2.4.49+dfsg-2ubuntu1.7_amd64.deb Size: 262364 MD5sum: 828d8f3fff290415003ea25979bd04a5 SHA1: 6dc8f0f9290e8b1fe600e304b74d77c8f64e0354 SHA256: 35c726dd296b9385eaeffcfbb6bd0a543c0371b17008bd0a97440b931fba9249 SHA512: 36f48229d344f11f381bc2ecf7f5a5c9f9895a45089eb3dab047eb024c9d53ea0fd15e49a520d0a256f8ade77ab98b6d79ed9d7e759013b8097160cde98bcace Homepage: http://www.openldap.org/ Description-en: OpenLDAP development libraries This package allows development of LDAP applications using the OpenLDAP libraries. It includes headers, libraries and links to allow static and dynamic linking.

Package: libldap2-dev Architecture: amd64 Version: 2.4.49+dfsg-2ubuntu1 Multi-Arch: same Priority: extra Section: libdevel Source: openldap Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian OpenLDAP Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1465 Provides: libldap-dev Depends: libldap-2.4-2 (= 2.4.49+dfsg-2ubuntu1) Conflicts: libldap-dev, libopenldap-dev Replaces: libopenldap-dev Filename: pool/main/o/openldap/libldap2-dev_2.4.49+dfsg-2ubuntu1_amd64.deb Size: 262288 MD5sum: f7e49e6febb52c11878f92b97c8ec781 SHA1: ef72a72fd03c369d29de9629eead453b08a8fc89 SHA256: 6663f298e3a5b882e3a420184c0de5af829352fc0e366f0a2304afe9e20267c9 Homepage: http://www.openldap.org/ Description-en: OpenLDAP development libraries This package allows development of LDAP applications using the OpenLDAP libraries. It includes headers, libraries and links to allow static and dynamic linking.

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

sudo apt-get -y install libldap2-dev

Install libldap2-dev Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libldap2-dev

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

sudo aptitude -y install libldap2-dev

How To Uninstall libldap2-dev on Ubuntu 20.04

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

sudo apt-get remove libldap2-dev

Uninstall libldap2-dev And Its Dependencies

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

sudo apt-get -y autoremove libldap2-dev

Remove libldap2-dev Configurations and Data

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

sudo apt-get -y purge libldap2-dev

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

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

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

References

Summary

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