Php
Debian:無法安裝 php7.4-curl - 取決於不可安裝
我最近從 debian9 (stretch) 升級到 debian10 (buster)。其中還包括升級到 php7.4。由於某種原因 php-curl 無法安裝。
我跑
apt install php7.4-curl
了,我得到的錯誤是: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-curl : Depends: libcurl3 (>= 7.44.0) but it is not installable E: Unable to correct problems, you have held broken packages.
我在任何地方都看不到任何持有的包裹。我試過了:
apt-mark showhold dpkg --audit dpkg --configure -a apt-get install -f apt-get clean apt-get update apt-get autoremove
我也試過刪除 curl、purge、autoremove,然後重新安裝。一樣。
我嘗試安裝 libcurl3
Package libcurl3 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libcurl4
debian10 自帶 php7.3 而不是 php7.4
https://packages.debian.org/search?suite=all&arch=any&searchon=names&keywords=php7
php 7.4 將出現在下一個 debian 11 (bullseye) 中。
您可以添加一些非 debian 儲存庫:
wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add - echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list sudo apt update sudo apt install php7.4 php7.4-curl