E:软件包‘libcurl3’在 ubuntu21.04 中没有安装候选项?

E:软件包‘libcurl3’在 ubuntu21.04 中没有安装候选项?

我对 ubuntu 操作系统很陌生,当我尝试安装 php7.2-curl 扩展(sudo apt-get install php7.2-curl)时,它引发了以下错误

The following packages have unmet dependencies:
 php7.2-curl : Depends: php7.2-common (= 7.2.34-23+ubuntu21.04.1+deb.sury.org+1) but 7.2.34-24+0~20210826.64+debian9~1.gbp428dfa is to be installed
E: Unable to correct problems, you have held broken packages.


我找到一些解决方案来解决这个问题(sudo apt-get install libcurl13 php7.2-curl)当我运行这个命令时它显示以下错误,如何解决这个问题,帮我解决这个问题

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:i386 libcurl4

E: Package 'libcurl3' has no installation candidate

答案1

在 Ubuntu 21.04 中,libcurl3 已被 libcurl4 取代,因此如果你安装 libcurl4,Ubuntu 将使用它而不是 libcurl3。打开终端并输入:

sudo apt update
sudo apt install libcurl4
sudo ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0 /usr/lib/x86_64-linux-gnu/libcurl.so.4.7.0
sudo apt install php7.2-curl

相关内容