ubuntu 20.04 samba 修复缺少依赖项

ubuntu 20.04 samba 修复缺少依赖项

我遇到了 Samba 问题,无法删除 Samba 或修复它,以下是我一直收到的提示:我试过了,apt --fix-broken install但结果几乎是一样的依赖问题

Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cifs-utils : Depends: libwbclient0 (>= 2:4.0.3+dfsg1) but it is not going to be installed
 libsmbclient : Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.10) but it is not going to be installed
 python3-samba : Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.10) but it is not going to be installed
 samba : Depends: samba-common (= 2:4.11.6+dfsg-0ubuntu1.9) but 2:4.11.6+dfsg-0ubuntu1.10 is to be installed
         Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.9) but it is not going to be installed
         Depends: samba-libs (= 2:4.11.6+dfsg-0ubuntu1.9) but 2:4.11.6+dfsg-0ubuntu1.10 is to be installed
 samba-common-bin : Depends: samba-common (= 2:4.11.6+dfsg-0ubuntu1.9) but 2:4.11.6+dfsg-0ubuntu1.10 is to be installed
                    Depends: samba-libs (= 2:4.11.6+dfsg-0ubuntu1.9) but 2:4.11.6+dfsg-0ubuntu1.10 is to be installed
                    Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.9) but it is not going to be installed
 samba-dsdb-modules : Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.10) but it is not going to be installed
 samba-libs : Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.10) but it is not going to be installed
 samba-vfs-modules : Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.10) but it is not going to be installed
 smbclient : Depends: samba-common (= 2:4.11.6+dfsg-0ubuntu1.9) but 2:4.11.6+dfsg-0ubuntu1.10 is to be installed
             Depends: samba-libs (= 2:4.11.6+dfsg-0ubuntu1.9) but 2:4.11.6+dfsg-0ubuntu1.10 is to be installed
             Depends: libwbclient0 (= 2:4.11.6+dfsg-0ubuntu1.9) but it is not going to be installed

答案1

可能的解决方案:

  1. 对您的命令进行“改进”的组合

    $ sudo apt update
    $ sudo apt install --fix-broken <all listed packages and dependencies in the message you reported>
    

    请注意,这包括:

    1.1. 先决条件update。你可能已经这样做了,我不知道。但这并没有什么坏处。

    1.2.sudo在您的install命令中。您可能已经这样做了。如果没有,那么仅这一点可能就是问题所在(我对返回的消息感到疑惑)。

    1.3。--fix-broken。如果存在上述一个或多个,则可能不需要这个。只有当 1.2 不起作用时,我才会尝试包含这个。

    1.4. 手动install安装所有包和依赖项。另请参阅。只有当 1.2 和 1.3 不起作用时,我才会尝试这个。只有当这个不起作用时,才会将它和 1.3 结合起来。

  2. 检查内容中/etc/apt/sources.list是否/etc/apt/sources.list.d/存在“奇怪”的存储库。

相关内容