为什么我无法在 Ubuntu 20.04 上安装 php7.4-intl?

为什么我无法在 Ubuntu 20.04 上安装 php7.4-intl?

我需要 Ubuntu 20.04 上的 PHP INTL 模块。当我这样做时

$ sudo apt install php7.4-intl

我明白了

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.4-intl : Depends: php7.4-common (= 7.4.3-4ubuntu2.2) but 7.4.8-1+ubuntu19.10.1+deb.sury.org+3 is to be installed
E: Unable to correct problems, you have held broken packages.

我们都知道包裹破损的消息只是个转移注意力的花招。(是的,我查过了……)

ubuntu19.10.1由于我使用的是 20.04,所以我对软件包中建议的部分感到怀疑apt

PHP 说:

PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

这让我更加困惑。我尝试了谷歌搜索可以找到的方法来解决 apt 配置和缓存中的任何不一致问题。(dpkg --configure -a,,apt clean/autoclean...)

答案1

php7.4-intl是从 Ubuntu 存储库安装的,而不是deb.sury您已安装并用于 PHP 的 PPA / 第三方存储库。

要么不要安装php-intl,要么不要使用 deb.sury 存储库。如果第三方存储库未提供所有内容,则使用第三方存储库将阻止您安装所有内容。

相关内容