[英]Debian apt and ipv6
我有一個僅限 ipv6 的服務器,並且想要更新系統。 但是,如果我執行“$ apt update”,我會收到以下消息:
Fehl:1 http://deb.debian.org/debian bullseye InRelease
»deb.debian.org« konnte nicht aufgelöst werden.
Fehl:2 http://deb.debian.org/debian bullseye-updates InRelease
»deb.debian.org« konnte nicht aufgelöst werden.
Fehl:3 http://security.debian.org/debian-security bullseye-security InRelease
»security.debian.org« konnte nicht aufgelöst werden.
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Alle Pakete sind aktuell.
W: Fehlschlag beim Holen von http://deb.debian.org/debian/dists/bullseye/InRelease »deb.debian.org« konnte nicht aufgelöst werden.
W: Fehlschlag beim Holen von http://security.debian.org/debian-security/dists/bullseye-security/InRelease »security.debian.org« konnte nicht aufgelöst werden.
W: Fehlschlag beim Holen von http://deb.debian.org/debian/dists/bullseye-updates/InRelease »deb.debian.org« konnte nicht aufgelöst werden.
W: Einige Indexdateien konnten nicht heruntergeladen werden. Sie wurden ignoriert oder alte an ihrer Stelle benutzt.
該消息的意思是“無法解析 deb.debian.org 地址。但是如果我使用 host 或 nslookup 命令嘗試它,一切都很好。如果我在 /etc/hosts 中插入 debian ipv6 地址,我可以 ping 它並且 apt 是工作正常。
我的 /etc/nsswitch.conf:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: files systemd
group: files systemd
shadow: files
gshadow: files
hosts: files dns mdns4_minimal [NOTFOUND=return]
networks: files dns
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
在不更改 /etc/hosts 文件的情況下,我應該怎么做才能讓它工作?
運行apt時添加-o Acquire::ForceIPv6=true
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.