大网数据广告活动
服务器运维问答

Debian: Cannot install php7.4-curl -- depends not installable

· 52CE 我爱测

I recently upgraded from debian9 (stretch) to debian10 (buster). Which also includes upgrading to php7.4. For some reason php-curl cannot install. I run apt install php7.4-curl and the error I get is: Some packages could not be i…

问题原文

原帖链接 · Matt Winer · CC BY-SA 4.0

I recently upgraded from debian9 (stretch) to debian10 (buster). Which also includes upgrading to php7.4. For some reason php-curl cannot install.

I run apt install php7.4-curl and the error I get is:

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.

I cannot see any held packages, anywhere. I have tried:

apt-mark showhold
dpkg --audit
dpkg --configure -a
apt-get install -f
apt-get clean
apt-get update
apt-get autoremove

I have also tried removing curl, purge, autoremove, and then reinstall. Same thing.

I try installing 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

已采纳解答

原帖链接 · Bartek Chanda · CC BY-SA 4.0

debian10 comes with php7.3 and not php7.4

https://packages.debian.org/search?suite=all&arch=any&searchon=names&keywords=php7

php 7.4 will be in next debian 11 (bullseye).

You can add some non-debian repositories:

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-05-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。