在 Ubuntu 上安装 cURL

在 Ubuntu 上安装 cURL

我正在尝试使用以下命令在我的 ubuntu 服务器上安装 cURL

sudo apt-get install php5-curl

但是我收到以下错误

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:
php5-curl: Depends: phpapi-20060613+lfs
Depends: php5-common (= 5.2.6.dfsg.1-3ubuntu4.5) but 5.3.2-0.dotdeb.1 is to be installed
E: Broken packages

我在跑步PHP 版本 5.3.2-0.dotdeb.1在我的服务器上。

当我尝试此命令时

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl

我得到以下输出

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libcurl3-dev is a virtual package provided by:
  libcurl4-openssl-dev 7.18.2-8ubuntu4.1
You should explicitly select one to install.
E: Package libcurl3-dev has no installation candidate
root@server:~# sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libcurl3-dev is a virtual package provided by:
  libcurl4-openssl-dev 7.18.2-8ubuntu4.1
You should explicitly select one to install.
E: Package libcurl3-dev has no installation candidate

有什么问题?我需要启动并运行 curl。

答案1

Depends: php5-common (= 5.2.6.dfsg.1-3ubuntu4.5) but 5.3.2-0.dotdeb.1 is to be installed

apt 不适应你的5.3.2-0.dotdeb.1所以它错过了php5 通用

修复你的 php 版本。最简单的方法应该是安装php5 通用定期检查 apt 并重试。

相关内容