在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 

这是什么问题? 我需要蜷缩起来,跑步。

 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-common

修复你的PHP版本。 最简单的方法应该是在apt上定期安装php5-common ,然后重试。