在RK3588终端出现错误:
排错:ping qq.com不通,但是ping qq.com的IP地址通:
判断为DNS服务器故障。
修改文件:/etc/resolv.conf
# /etc/systemd/resolved.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
# Cloudflare: 1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
# Google: 8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
# Quad9: 9.9.9.9 2620:fe::fe
DNS=8.8.8.8 8.8.4.4
#FallbackDNS=
#Domains=
#DNSSEC=no
#DNSOverTLS=no
#MulticastDNS=yes
#LLMNR=yes
#Cache=yes
#DNSStubListener=yes
#DNSStubListenerExtra=
#ReadEtcHosts=yes
#ResolveUnicastSingleLabel=no
重新启动 systemd-resolved
服务:
sudo systemctl restart systemd-resolved
/etc/resolv.conf
指向 systemd-resolved
的本地存根解析器 127.0.0.53,
systemd-resolved
使用这个地址来监听来自本地系统的 DNS 查询,然后它将使用在 resolved.conf
中配置的上游 DNS 服务器(即 8.8.8.8
和 8.8.4.4
)来解析这些查询。
linaro@linaro-alip:~/Desktop$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
search AD.AIIT.ORG.CN
成功地 ping qq.com
并获取其 IP 地址 61.129.7.47
。
出现新错误:
尝试使用不同的Debian镜像源:/etc/apt/sources.list
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main
deb http://deb.debian.org/debian/ bullseye-updates main
deb-src http://deb.debian.org/debian/ bullseye-updates main
deb http://deb.debian.org/debian-security/ bullseye-security main
deb-src http://deb.debian.org/debian-security/ bullseye-security main
deb http://deb.debian.org/debian/ bullseye-backports main
deb-src http://deb.debian.org/debian/ bullseye-backports main
仍然错误:
使用清华镜像源:debian | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
配置APT忽略SSL证书检查。在/etc/apt/apt.conf.d/
目录下的一个新文件99ignoressl中添加:
Acquire::https::mirrors.tuna.tsinghua.edu.cn::Verify-Peer "false";
Acquire::https::security.debian.org::Verify-Peer "false";
仍然报错: