3

I am trying to install the libldap2-dev package.

sudo apt-get install libldap2-dev

I get the following error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libldap2-dev : Depends: libldap-2.4-2 (= 2.4.31-1+nmu2ubuntu8.2) but 2.4.31-1+nmu2ubuntu8.3 is to be installed
E: Unable to correct problems, you have held broken packages.

It looks like I need to install 2.4.31-1+nmu2ubuntu8.2 not 2.4.31-1+nmu2ubuntu8.3

I've tried:

sudo apt-get install libldap2-dev=2.4.31-1+nmu2ubuntu8.2

I get the same error when doing so.

I've also found this but am still having trouble: Here

4 Answers 4

2

Resolved with

sudo aptitude install libldap2-dev

At first it suggested to do nothing, I've selected No, then it suggested to downgrade my current install to proper version. I've selected Yes.

0

I was able to re-install libldap2-dev by first removing it and then installing. Here was the steps that worked

sudo apt-get remove libldap2-dev //remove
sudo apt-get install libldap2-dev=2.4.31-1+nmu2ubuntu8.2

Note: I had to remove the packages that libldap2-dev said they no longer needed. This was asked after the sudo apt-get remove libldap2-dev command.

1
  • Your sources are broken. The latest version of libldap2-dev in Trusty depends on version 2.4.31-1+nmu2ubuntu8.3 of libldap-2.4-2 (note that both packages have the same version number). Installing an out-of-date version of libldap2-dev is not the correct thing to do. Rather, you should figure out why your archive mirror is not supplying the correct version of it.
    – fkraiem
    Aug 23, 2016 at 20:11
0

Try sudo apt-get install libldap2-dev checkinstall and see if that installs the dependencies.

0

first you should install synaptic :

 sudo apt-get install synaptic

and then install libldap2-dev using synaptic (by checking libldap2-dev in synaptic)
it will take care of dependencies.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .