Php

未滿足的依賴項:php-memcached:依賴:phpapi-20190902

  • January 6, 2022

我正在嘗試安裝 php-memcached(使用 php8.1)但出現以下錯誤:

# apt install php-memcached
Reading package lists... Done
Building dependency tree... Done
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:
php-memcached : Depends: phpapi-20190902
E: Unable to correct problems, you have held broken packages.

我更新了 apt 並嘗試了 apt install phpapi-20190902 但這給出了:

Package phpapi-20190902 is a virtual package provided by:
 php7.4-phpdbg 7.4.26-1
 php7.4-fpm 7.4.26-1
 php7.4-cli 7.4.26-1
 php7.4-cgi 7.4.26-1
 libphp7.4-embed 7.4.26-1
 libapache2-mod-php7.4 7.4.26-1
You should explicitly select one to install.

E: Package 'phpapi-20190902' has no installation candidate

當我使用 php 8.1(debian buster)時,那是 php7.4 包。我試過apt install php8.1-fpm了,它安裝得很好,但仍然有同樣的問題。我有點失落。

好像您是php8.1sid儲存庫安裝的。

sid儲存庫包含php8.1-memcache包,它被描述為“PHP 的 memcache 擴展模組”

如果那是您正在尋找的,您應該安裝它並查看它是否提供您所期望的。如果這不是您正在尋找的,您應該使用更多資訊來澄清您的問題。

引用自:https://unix.stackexchange.com/questions/684941