Debian 11 Bullseye를 설치했는데 이것이 내 source.list 파일입니다:
deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
업데이트를 사용하려고 하면 apt update
다음 오류가 발생합니다.
Err:1 http://deb.debian.org/debian bullseye InRelease
Could not resolve 'deb.debian.org'
Err:2 http://security.debian.org.debian-security bullseye InRelease
Could not resolve 'deb.debian.org'
Err:3 http://deb.debian.org/debian bullseye-updates InRelease
Could not resolve 'deb.debian.org'
Err:4 http://security.debian.org.debian bullseye-backports InRelease
Could not resolve 'deb.debian.org'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Could not resolve 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/bullseye-security/InRelease Could not resolve 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Could not resolve 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-backports/InRelease Could not resolve 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.
내 source.list 파일에 어떤 문제가 있나요? 또 설정할 것이 있나요?
답변1
루트로 복사합니다 /etc/resolv.conf
(CLI cp /etc/resolv.conf /etc/resolv.conf.orig
). 그런 다음 다음 명령을 실행하십시오.
# printf '%s\n' 'nameserver 1.1.1.1' 'nameserver 1.0.0.1' > /etc/resolv.conf
# ping -c 4 deb.debian.org; printf 'Return code: %s\n' "$?"
마지막 줄이 이면 Return code: 0
제대로 apt update
작동할 것입니다.