14

Coming from Trusty, I was used to ldapsearch but I don't have it installed on my new Xerus install:

The program 'ldapsearch' is currently not installed. You can install it by typing:

sudo apt install ldap-utils

But unfortunately this results in an apt conflict that I don't know how to resolve.

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:  
ldap-utils : Depends: libldap-2.4-2 (= 2.4.42+dfsg-2ubuntu3) but 2.4.42+dfsg-2ubuntu3.1 is to be installed  
E: Unable to correct problems, you have held broken packages.

What should I do to install ldapsearch?

3
  • try sudo apt install -f then try installing again. – George Udosen Jan 8 '17 at 22:15
  • You probably need to run sudo apt update once again (if not already run). – muru Mar 2 '17 at 2:58
  • This problem still exists in Ubuntu 20.04. I have ldap-utils : Depends: libldap-2.4-2 (= 2.4.49+dfsg-2ubuntu1.2) but 2.4.49+dfsg-2ubuntu1.3 is to be installed. I tried to compile it from the source but I failed. – xonya Sep 28 '20 at 9:06
4

After digging around for a while under System Settings > Software & Updates I remembered once upon a time that I disabled the install updates from the following sources because I got a little annoyed with the frequent interrupting pop-ups to upgrade. I prefer to manage my upgrades manually from apt on the terminal and I didn't want it to automatically upgrade me from 16.04 to 16.10 or some other release. What I didn't realize is that these checkboxes stripped the deb package sources from /etc/apt/sources.list so it would never fetch the package updates and always report my system was up-to-date. After checking those boxes and then running apt update and upgrade I was able to successfully install ldap-utils

screenshot software and updates install updates from all

0
sudo apt install aptitude
sudo aptitude install ldap-utils 

    Keep the following packages at their current version:
1)     ldap-utils [Not Installed]                         



Accept this solution? [Y/n/q/?] **n**
The following actions will resolve these dependencies:

     Downgrade the following packages:                                          
1)     libldap-2.4-2 [2.4.49+dfsg-2ubuntu1.3 (now) -> 2.4.49+dfsg-2ubuntu1.2 (fo



Accept this solution? [Y/n/q/?] **Y**
-1

I was also facing same issue.

OS: Ubuntu 16.04.4 LTS 64 bit

Logs:

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:  
ldap-utils : Depends: libldap-2.4-2 (= 2.4.42+dfsg-2ubuntu3) but 2.4.42+dfsg-2ubuntu3.1 is to be installed  
E: Unable to correct problems, you have held broken packages.

Steps that solved problem:

  1. Run command: sudo apt install -f
  2. Run command: sudo apt install ldap-utils

Yes now I can see ldapsearch is installed on my system

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.