Skip to content
Advertisement

Can’t install php7.2-ldap on Ubuntu 18.10 – “unmet dependencies”

Recently I’m working with Laravel and LDAP (Active directory) authentication. But I can’t install php7.2-ldap, I also tried to install in php7.3 but failed.

Currently I’m using ubuntu v18.10 with multiple php version.

I tried: $ sudo apt-get install php7.2-ldap and got this output

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.

I also tried $ sudo apt-get update and upgrade also before do it.

Advertisement

Answer

7.2.20-1+ubuntu18.10.1+deb.sury.org+1 is to be installed

deb.sury.org refers to Ondřej Surý PPA, you need to reinstall php following these steps :

  • You need to have the software-properties-common package installed :

    sudo apt-get install software-properties-common
    
  • Add the ondrej PPA repo and update sources :

    sudo add-apt-repository -y ppa:ondrej/php
    sudo apt-get update
    
  • Install php and needed extensions :

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

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

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement