Sambaをインストールするときに満たされていない依存関係を満たす方法は?

Sambaをインストールするときに満たされていない依存関係を満たす方法は?
sudo apt-get install samba samba-common
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 (= 2:4.17.10+dfsg-0+deb12u1) but it is not going to be installed
         Depends: samba-common-bin (= 2:4.17.10+dfsg-0+deb12u1) but it is not installable
         Depends: libc6 (>= 2.34) but 2.31-13+deb11u6 is to be installed
         Depends: libldb2 (>= 2:2.6.1) but 2:2.2.3-2~deb11u2 is to be installed
         Depends: libtalloc2 (>= 2.3.4~) but 2.3.1-2+b1 is to be installed
         Depends: libtdb1 (>= 1.4.7~) but 1.4.3-1+b1 is to be installed
         Depends: libtevent0 (>= 0.13.0~) but 0.10.2-1 is to be installed
         Depends: samba-libs (= 2:4.17.10+dfsg-0+deb12u1) but 2:4.13.13+dfsg-1~deb11u5 is to be installed
         Recommends: attr but it is not going to be installed
         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
         Recommends: samba-ad-provision but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

満たされていない依存関係を解決するには?

ポリシーステータス:

sudo apt policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://mirrors.ustc.edu.cn/debian-security stable-security/main amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=amd64
     origin mirrors.ustc.edu.cn
 100 http://mirrors.163.com/debian bullseye-backports/contrib amd64 Packages
     release o=Debian Backports,a=bullseye-backports,n=bullseye-backports,l=Debian Backports,c=contrib,b=amd64
     origin mirrors.163.com
 100 http://mirrors.163.com/debian bullseye-backports/non-free amd64 Packages
     release o=Debian Backports,a=bullseye-backports,n=bullseye-backports,l=Debian Backports,c=non-free,b=amd64
     origin mirrors.163.com
 100 http://mirrors.163.com/debian bullseye-backports/main amd64 Packages
     release o=Debian Backports,a=bullseye-backports,n=bullseye-backports,l=Debian Backports,c=main,b=amd64
     origin mirrors.163.com
 500 http://mirrors.163.com/debian bullseye-updates/main amd64 Packages
     release v=11-updates,o=Debian,a=oldstable-updates,n=bullseye-updates,l=Debian,c=main,b=amd64
     origin mirrors.163.com
 500 http://mirrors.163.com/debian bullseye/contrib amd64 Packages
     release v=11.7,o=Debian,a=oldstable,n=bullseye,l=Debian,c=contrib,b=amd64
     origin mirrors.163.com
 500 http://mirrors.163.com/debian bullseye/non-free amd64 Packages
     release v=11.7,o=Debian,a=oldstable,n=bullseye,l=Debian,c=non-free,b=amd64
     origin mirrors.163.com
 500 http://mirrors.163.com/debian bullseye/main amd64 Packages
     release v=11.7,o=Debian,a=oldstable,n=bullseye,l=Debian,c=main,b=amd64
     origin mirrors.163.com
Pinned packages:

私のオペレーティングシステム:

uname -a
Linux debian 5.10.0-22-amd64 #1 SMP Debian 5.10.178-3 (2023-04-22) x86_64 GNU/Linux

ベストアンサー1

Debian 11を実行しているようですが、stable-security現在Debian 12への参照があります。この問題を解決するには、instable-securityとfiles inを置き換えます。bullseye-security/etc/apt/sources.list/etc/apt/sources.list.d

sudo sed -i.bak s/stable-security/bullseye-security/ /etc/apt/sources.list
sudo sed -i.bak s/stable-security/bullseye-security/ /etc/apt/sources.list.d/*

その後、更新

sudo apt update

その後、インストールできますsamba。一部のパッケージが以前にDebian 12バージョンにアップデートされている場合は、そのパッケージをDebian 11バージョンにダウングレードする必要があるかもしれません。

おすすめ記事