Unable to correct problems, you have held broken packages , When I Install php on ubuntu 16.04

21,331

Solution 1

You can use Aptitude to automatically fix the broken packages.

sudo apt-get install aptitude

sudo aptitude install libmodule libapache2-mod-php

Solution 2

You need to install PHP7 to fixt it

sudo add-apt-repository ppa:ondrej/php-7.0
sudo apt-get update
sudo apt-get install php7.0-cli php7.0-common libapache2-mod-php7.0 php7.0 php7.0-mysql php7.0-fpm php7.0-curl php7.0-gd php7.0-bz2
Share:
21,331

Related videos on Youtube

Ghadeer R. Majeed
Author by

Ghadeer R. Majeed

Updated on September 18, 2022

Comments

  • Ghadeer R. Majeed
    Ghadeer R. Majeed over 1 year

    Why I see this problem when i want to install php on ubuntu 16.04 and how can I fix it ?

    the problem is this : Click To See The Image

    I have tried :

    apt-get update
    apt-get upgrade
    apt-get dist-upgrade
    apt-get install -f
    apt-get clean
    apt-get autoclean
    apt-get autoremove
    dpkg --configure -a
    

    And there is no problem with doing these commands !