3

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 !

Fabby
  • 34,341
  • 38
  • 97
  • 191
Ghadeer R. Majeed
  • 193
  • 2
  • 2
  • 8
  • 1
    Possible duplicate of [Unable to correct problems, you have held broken packages](http://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages) – fakedad Aug 20 '16 at 03:58
  • I tried these solutions but the problem is still the same :( – Ghadeer R. Majeed Aug 20 '16 at 21:04

3 Answers3

5

You can use Aptitude to automatically fix the broken packages.

sudo apt-get install aptitude

sudo aptitude install libmodule libapache2-mod-php
Nick Weinberg
  • 4,555
  • 4
  • 24
  • 30
user6583379
  • 51
  • 1
  • 2
1

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
Fcmam5
  • 249
  • 2
  • 8
0

You need to install the required PHP modules dependencies before you run PHP7.3 successful.

sudo apt install php7.3-mysql php7.3-curl php7.3-json php7.3-cgi php7.3-xsl