尝试安装 samba 时未满足依赖项,Ubuntu 22.04-2

尝试安装 samba 时未满足依赖项,Ubuntu 22.04-2

这是 Ubuntu 22.04.2 的一周前安装。我已经成功安装了各种程序,并希望在本地网络上共享文件夹。当我从文件转到此文件时,它要求安装 samba,但安装失败并显示以下消息。我可以添加有关存储库的信息,但 AskUbuntu/StackExchange 似乎阻止我添加它们。它们并不奇特。

root@Clevo2:/etc/apt/sources.list.d# apt-get install samba
Reading package lists... Done
Building dependency tree... Done
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.
 samba : Depends: python3-samba but it is not going to be installed
         Depends: samba-common-bin (= 2:4.15.9+dfsg-0ubuntu0.3) but it is not going to be installed
         Depends: libwbclient0 (= 2:4.15.9+dfsg-0ubuntu0.3) but 2:4.15.13+dfsg-0ubuntu1.1 is to be installed
         Depends: samba-libs (= 2:4.15.9+dfsg-0ubuntu0.3) but 2:4.15.13+dfsg-0ubuntu1.1 is to be installed
         Recommends: attr
         Recommends: python3-markdown but it is not going to be installed
         Recommends: samba-dsdb-modules but it is not going to be installed
         Recommends: samba-vfs-modules but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@Clevo2:/etc/apt/sources.list.d# apt-get --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

添加 13.iv.23:apt-cache policy samba python3-samba samba-common-bin libwbclient0 samba-libs Is 的输出如下

root@Clevo2:/home/chris# apt-cache policy samba python3-samba samba-common-bin libwbclient0 samba-libs
samba:
  Installed: (none)
  Candidate: 2:4.15.9+dfsg-0ubuntu0.3
  Version table:
     2:4.15.9+dfsg-0ubuntu0.3 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-updates/main amd64 Packages
     2:4.15.9+dfsg-0ubuntu0.2 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-security/main amd64 Packages
     2:4.15.5~dfsg-0ubuntu5 500
        500 http://mirror.infomaniak.ch/ubuntu jammy/main amd64 Packages
python3-samba:
  Installed: (none)
  Candidate: 2:4.15.9+dfsg-0ubuntu0.3
  Version table:
     2:4.15.9+dfsg-0ubuntu0.3 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-updates/main amd64 Packages
     2:4.15.9+dfsg-0ubuntu0.2 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-security/main amd64 Packages
     2:4.15.5~dfsg-0ubuntu5 500
        500 http://mirror.infomaniak.ch/ubuntu jammy/main amd64 Packages
samba-common-bin:
  Installed: (none)
  Candidate: 2:4.15.9+dfsg-0ubuntu0.3
  Version table:
     2:4.15.9+dfsg-0ubuntu0.3 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-updates/main amd64 Packages
     2:4.15.9+dfsg-0ubuntu0.2 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-security/main amd64 Packages
     2:4.15.5~dfsg-0ubuntu5 500
        500 http://mirror.infomaniak.ch/ubuntu jammy/main amd64 Packages
libwbclient0:
  Installed: 2:4.15.13+dfsg-0ubuntu1.1
  Candidate: 2:4.15.13+dfsg-0ubuntu1.1
  Version table:
 *** 2:4.15.13+dfsg-0ubuntu1.1 100
        100 /var/lib/dpkg/status
     2:4.15.9+dfsg-0ubuntu0.3 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-updates/main amd64 Packages
     2:4.15.9+dfsg-0ubuntu0.2 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-security/main amd64 Packages
     2:4.15.5~dfsg-0ubuntu5 500
        500 http://mirror.infomaniak.ch/ubuntu jammy/main amd64 Packages
samba-libs:
  Installed: 2:4.15.13+dfsg-0ubuntu1.1
  Candidate: 2:4.15.13+dfsg-0ubuntu1.1
  Version table:
 *** 2:4.15.13+dfsg-0ubuntu1.1 100
        100 /var/lib/dpkg/status
     2:4.15.9+dfsg-0ubuntu0.3 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-updates/main amd64 Packages
     2:4.15.9+dfsg-0ubuntu0.2 500
        500 http://mirror.infomaniak.ch/ubuntu jammy-security/main amd64 Packages
     2:4.15.5~dfsg-0ubuntu5 500
        500 http://mirror.infomaniak.ch/ubuntu jammy/main amd64 Packages
root@Clevo2:/home/chris#

我希望这能指出碰撞并找到解决它们的方法。

答案1

我破解了包中的 post-inst 脚本,基本上禁用了所有功能并重新打包成一个单独的 .deb 文件。

然后我使用 dpkg 安装了这个修复的 .deb,其余的升级顺利进行。

相关内容