如何在 16.04 上安装 ldapsearch?

如何在 16.04 上安装 ldapsearch?

来自 Trusty,我习惯于ldap搜索但我没有在新安装的 Xerus 上安装它:

程序“ldapsearch”当前未安装。您可以输入以下命令进行安装:

sudo apt install ldap-utils

但不幸的是,这导致了我不知道如何解决的冲突。

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.

我应该怎么做才能安装ldap搜索

答案1

System Settings在>下搜索了一段时间后Software & Updates,我想起曾经禁用了以下来源的安装更新,因为我对频繁弹出升级窗口感到有点恼火。我更喜欢在apt终端上手动管理我的升级,我不希望它自动将我从 16.04 升级到 16.10 或其他版本。我没有意识到的是,这些复选框剥夺了 deb 软件包源,因此/etc/apt/sources.list它永远不会获取软件包更新,并且始终报告我的系统是最新的。选中这些复选框并运行后apt updateupgrade我能够成功安装 ldap-utils

屏幕截图软件和更新安装所有更新

答案2

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**

答案3

我也面临同样的问题。

操作系统:Ubuntu 16.04.4 LTS 64 位

日志:

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.

解决问题的步骤:

  1. 运行命令:sudo apt install -f
  2. 运行命令:sudo apt install ldap-utils

是的,现在我可以看到 ldapsearch 已安装在我的系统上

相关内容