美文网首页
apt-get包依赖的解决

apt-get包依赖的解决

作者: YANWeichuan | 来源:发表于2018-11-05 14:51 被阅读0次

    在ubuntu中安装一些包的时候会出现次版本上的冲突,可以通过单独安装该包来解决。
    例如

    The following packages have unmet dependencies:
     libldap2-dev : Depends: libldap-2.4-2 (= 2.4.42+dfsg-2ubuntu3) but 2.4.42+dfsg-2ubuntu3.2 is to be installed
    E: Unable to correct problems, you have held broken packages.
    

    可以通过等号指定包名命令来安装上:

    sudo apt-get install libldap-2.4-2=2.4.42+dfsg-2ubuntu3
    

    等号的作用,通过man apt-get得到的说明为:

       DESCRIPTION
           install
              ...
               A specific version of a package can be selected for installation by
               following the package name with an equals and the version of the
               package to select. This will cause that version to be located and
               selected for install. Alternatively a specific distribution can be
               selected by following the package name with a slash and the version
               of the distribution or the Archive name (stable, testing,
               unstable).
    

    相关文章

      网友评论

          本文标题:apt-get包依赖的解决

          本文链接:https://www.haomeiwen.com/subject/ubjsxqtx.html