Install php5.6 in Debian 9(在 Debian 9 中安装 php5.6)
问题描述
如何在Debian 9
以下软件包具有未满足的依赖关系: libapache2-mod-php5 :取决于:libdb5.1 但它不可安装 取决于:libonig2 (>=5.2.0)但它不可安装取决于:libssl1.0.0(> = 1.0.1)但它不可安装取决于:apache2-mpm-prefork 但它不是可安装或 apache2-mpm-itk 但不可安装取决于:php5-cli 但它不会被安装 E: 无法更正问题,你拿着破损的包裹.
The following packages have unmet dependencies: libapache2-mod-php5 : Depends: libdb5.1 but it is not installable Depends: libonig2 (>= 5.2.0) but it is not installable Depends: libssl1.0.0 (>= 1.0.1) but it is not installable Depends: apache2-mpm-prefork but it is not installable or apache2-mpm-itk but it is not installable Depends: php5-cli but it is not going to be installed E: Unable to correct problems, you have held broken packages.
推荐答案
你可以使用 Ondřej Surý 发布的包,见 deb.sury.org
You can use the packages released by Ondřej Surý , see deb.sury.org
打开终端并运行以下命令:
Open the terminal and run the following command:
apt-get install apt-transport-https lsb-release ca-certificates
获取 gpg 密钥:
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
或:
curl https://packages.sury.org/php/apt.gpg | apt-key add -
将新存储库添加到您的源:
Add the new repository to your sources:
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
安装 PHP5.6
apt-get update
apt-get install php5.6
在 PHP 版本之间切换:
To switch between PHP versions:
update-alternatives --config php
样本输出:
----------------------------------------------------------
* 0 /usr/bin/php7.0 70 mode automatique
1 /usr/bin/php5.6 56 mode manuel
2 /usr/bin/php7.0 70 mode manuel
这篇关于在 Debian 9 中安装 php5.6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Debian 9 中安装 php5.6


- SoapClient 设置自定义 HTTP Header 2021-01-01
- Mod使用GET变量将子域重写为PHP 2021-01-01
- Laravel 仓库 2022-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01