分手后在 debian 9 上安装 php

Reinstall php on on debian 9 after brokeup

我在我的 debian stretch 系统上安装了 php7.3,它正在运行。在我尝试安装 php7.3-gd 后,我的 php 不再有效。当我 运行 php 我得到 /usr/bin/php file not found。当我尝试重新安装 php 时出现此错误 以下包具有未满足的依赖项:

php7.3 : Depends: libapache2-mod-php7.3 but it is not going to be installed or
                  php7.3-fpm but it is not going to be installed or
                  php7.3-cgi but it is not going to be installed

php7.3-cli : Depends: php7.3-opcache but it is not going to be installed
             Depends: libc6 (>= 2.29) but 2.24-11+deb9u4 is to be installed
php7.3-curl : Depends: libcurl4 (>= 7.44.0) but it is not installable

E: Unable to correct problems, you have held broken packages

试试这个命令:

apt-get install --fix-missing
1- sudo apt-get update –fix-missing
2- sudo dpkg –configure -a
3- sudo apt-get install -f

其中一个命令应该可以修复损坏的安装

这对我有用。

sudo apt-get install aptitude

sudo aptitude install php7.3