Debian Stretch apt-get 更新失败,解决“ftp.de.debian.org”问题

Debian Stretch apt-get 更新失败,解决“ftp.de.debian.org”问题

自从我将 debian 从 jessie 更新为stretchapt-get 更新失败。

错误信息:

Err:1 http://ftp.de.debian.org/debian stretch InRelease
  Temporary failure resolving 'ftp.de.debian.org'

互联网和 DNS 工作正常。

此解决方法可以解决该问题: 延伸 apt 更新失败,镜像上缺少 InRelease 文件

但我的问题是: 是否可以修复 apt 以便我可以像往常一样再次使用它?

输出:挖掘 ftp.de.debian.org :

; <<>> DiG 9.10.3-P4-Debian <<>> ftp.de.debian.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20953
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;ftp.de.debian.org.             IN      A

;; ANSWER SECTION:
ftp.de.debian.org.      365     IN      A       141.76.2.4

;; Query time: 31 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Tue Feb 26 10:30:37 CET 2019
;; MSG SIZE  rcvd: 62

输出 ls -l /etc/resolv.conf :-rw-r--r-- 1 root root 62 Feb 19 13:07 /etc/resolv.conf

输出 cat /etc/resolv.confnameserver 8.8.8.8 nameserver 8.8.4.4 nameserver 192.168.1.2

编辑: 猫 /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:         compat
group:          compat
shadow:         compat

hosts:  dns files
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

相关内容