How To Install libldap-java on Ubuntu 18.04

In this tutorial we learn how to install libldap-java on Ubuntu 18.04. libldap-java is Netscape Directory SDK for Java

Introduction

In this tutorial we learn how to install libldap-java on Ubuntu 18.04.

What is libldap-java

libldap-java is:

The Netscape Directory SDK for Java includes the LDAP Java classes, which you use to build LDAP clients. The LDAP Java classes allow you to write applets and applications that can connect to LDAP servers and perform standard LDAP operations (for example, you can search for entries or add, update, or delete entries).

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

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

sudo apt-get update

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

sudo apt-get -y install libldap-java

Install libldap-java Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install libldap-java

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

sudo aptitude -y install libldap-java

How To Uninstall libldap-java on Ubuntu 18.04

To uninstall only the libldap-java package we can use the following command:

sudo apt-get remove libldap-java

Uninstall libldap-java And Its Dependencies

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

sudo apt-get -y autoremove libldap-java

Remove libldap-java Configurations and Data

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

sudo apt-get -y purge libldap-java

Remove libldap-java configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge libldap-java

References

Summary

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