大家早上好!我试图在 Debian jessie 机器上安装 PHP 7.3,但是当我使用apt-get 安装 php7.3命令。我已经尝试安装 apt 告知它需要的所有依赖项,但没有成功。我还更改了我的 /etc/apt/source.list 文件并执行了 apt-get update,然后执行了 apt-get upgrade,但没有成功。尝试 apt-get install php7.3 时它给我的消息如下:
Reading package lists ... Ready
Building dependency tree
Reading status information ... Ready
Some packages could not be installed. This may mean that
you asked for an impossible situation or, if you are using the
unstable distribution, that some required packages were not
created yet or were taken from the "Incoming".
The following information may help resolve the situation:
The following packages have mismatched dependencies:
php7.3: Depends: libapache2-mod-php7.3 but will not install or
php7.3-fpm but will not be installed or
php7.3-cgi but will not install
E: Impossible to fix problems, you kept (hold) broken packages.
有人遇到过这种情况吗?你能帮帮我吗?
答案1
首先,更新并自动删除过时的软件包。这将为您完成此操作:
https://github.com/TurboLabIt/zzupdate
那么,我猜你缺少了 repo。删除你所做的并运行以下命令:
apt purge --auto-remove php* -y -qq
LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php -y
apt update -qq
## mcrypt is discontinued since PHP 7.2
apt install php${PHP_VER}-fpm php${PHP_VER}-cli php${PHP_VER}-common php${PHP_VER}-mbstring php${PHP_VER}-gd php${PHP_VER}-intl php${PHP_VER}-xml php${PHP_VER}-mysql php${PHP_VER}-zip php${PHP_VER}-curl -y -qq
对于可以立即使用的解决方案,请尝试一下:https://github.com/TurboLabIt/webstackup