在Ubuntu上安装cURL


2

我试图使用该命令在我的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 在我的服务器上。 问题是什么?我需要卷起并运行。

Answers:


2

看起来你已经安装了 php5-common 来自 Dotdeb 存储库,但Dotdeb不提供 php5-curl 包。您需要使用官方Ubuntu存储库中的版本替换PHP,或者您需要针对Dotdeb版本自行构建php5-curl。


0

看来包裹在您的来源中被破坏了。

也许你可以测试一下:

apt-get install curl


0

首先,您可能需要运行此命令 sudo apt-get update


2
你能否稍微扩展一下你的答案并告诉我们为什么这会解决这个问题?谢谢!
slhck

apt-get update 从镜像刷新服务器的包列表,确保您不下载旧包,并且包数据库中存在新的不一致。
jeffcook2150
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.