无法在Ubuntu 18.10上安装php7.2-ldap-“未满足的依赖项”

时间:2019-09-11 10:06:40

标签: php linux ubuntu ldap

最近,我正在使用Laravel和LDAP(活动目录)身份验证。但是我无法安装php7.2-ldap,我也尝试在php7.3中安装但失败。

当前,我正在使用具有多个php版本的ubuntu v18.10。

我尝试过:  $ sudo apt-get install php7.2-ldap 得到了这个输出

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:
 php7.2-ldap : Depends: php7.2-common (= 7.2.19-0ubuntu0.18.10.1) but 7.2.20-1+ubuntu18.10.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.

我还尝试过$ sudo apt-get updateupgrade

1 个答案:

答案 0 :(得分:-1)

  

将要安装

7.2.20-1 + ubuntu18.10.1 + deb.sury.org + 1

deb.sury.org指OndřejSurýPPA,您需要按照以下步骤重新安装php:

  • 您需要安装software-properties-common软件包:

    sudo apt-get install software-properties-common
    
  • 添加ondrej PPA存储库并更新源:

    sudo add-apt-repository -y ppa:ondrej/php
    sudo apt-get update
    
  • 安装php和所需的扩展名:

    sudo apt-get install php7.2-common php7.2-ldap
    

操作方法:https://pixelspress.com/how-to-install-php-7-2-on-ubuntu-16-04-18-04-18-10/

相关问题