由于未满足依赖关系而无法在Ubuntu 18上安装PHP7.2-dev

时间:2018-06-21 15:24:12

标签: ubuntu php-7.2

我有Ubuntu 18发行版,但是我需要安装php7.2-dev来进行PECL扩展。

mvolchkov@ias-su:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:    18.04
Codename:   bionic

我尝试安装php7.2-dev:

mvolchkov@ias-su:~$ sudo apt-get install php7.2-dev
Unresolved packages:
 php7.2-dev : Depend on: libpcre3-dev (>= 2:8.35) but will not be installed
              Depend on: libssl-dev but will not be installed

但这取决于:libpcre3-dev
比我尝试安装libpcre3-dev,但出现以下错误:

mvolchkov@ias-su:~$ sudo apt-get install libpcre3-dev
 libpcre3-dev : Depend on: libpcre3 (= 2:8.39-9) но 2:8.41-4+ubuntu17.10.1+deb.sury.org+1 will be installed
E: Impossible to resolve problems, you have held packages.

1 个答案:

答案 0 :(得分:0)

我遇到了相同的问题来解决此问题:

sudo add-apt-repository ppa: ondrej/php -y
sudo apt-get update
sudo apt-get install php7.2-dev

如果它不起作用,请尝试这样强制它: 此解决方案实在是太过分了,因为您将强制安装未经身份验证的数据包

sudo apt-get install php7.2-dev  -y --all-not authenticated