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에 대한 참조가 있습니다. 이 문제를 해결하려면 in stable-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 버전으로 다운그레이드해야 할 수도 있습니다.

관련 정보