在 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在我的服务器上。有什么问题?我需要启动并运行 curl。

答案1

看起来你已经php5-common多特德布存储库,但 Dotdeb 不提供软件包php5-curl。您需要将 PHP 替换为官方 Ubuntu 存储库中的版本,或者您需要针对 Dotdeb 版本自行构建 php5-curl。

答案2

看来您的来源中的包已损坏。

也许你可以测试一下:

apt-get 安装 curl

答案3

首先,你可能需要运行这个命令sudo apt-get update

相关内容