安装nginx乘客模块时发生apt-get依赖性问题

对不起,我不知道如何解决依赖关系问题。

我的Ubuntu服务器是12.04 64位

$ sudo apt-get install libcurl4-openssl-dev 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: libcurl4-openssl-dev : Depends: libcurl3 (= 7.19.7-1ubuntu1.5) but 7.22.0-3ubuntu4.2 is to be installed Depends: libidn11-dev but it is not going to be installed Depends: libldap2-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages. 

这看起来像是一个只从10.04升级到12.04的系统。 要解决此问题,您需要完成升级。

  1. 编辑/etc/apt/sources.list并用precisereplace所有lucid

  2. 编辑/etc/apt/sources.list.d目录中的所有文件,并应用与上述相同的replace。

    如果上述文件中的任何一个具有非precise的Ubuntu代码名称 ,请将其更改为precise

  3. 编辑/etc/apt/preferences并删除你可能已经完成的任何固定。

  4. 完成升级:

     sudo apt-get update && sudo apt-get dist-upgrade 
  5. 重新启动计算机。

现在尝试再次安装您的软件。