按照文档操作(定制Ubuntu 22.04文件系统 - HI-MPI - Atlas 200I A2 加速模块 23.0.x(23.0.3及其系列版本) 驱动开发指南 04 - 华为)进入根系统后,执行apt-get update报错如下
Ign:1 https://repo.huaweicloud.com/ubuntu-ports bionic InRelease Ign:2 https://repo.huaweicloud.com/ubuntu-ports bionic-security InRelease Ign:3 https://repo.huaweicloud.com/ubuntu-ports bionic-updates InRelease Ign:4 https://repo.huaweicloud.com/ubuntu-ports bionic-backports InRelease Ign:1 https://repo.huaweicloud.com/ubuntu-ports bionic InRelease Ign:2 https://repo.huaweicloud.com/ubuntu-ports bionic-security InRelease Ign:3 https://repo.huaweicloud.com/ubuntu-ports bionic-updates InRelease Ign:4 https://repo.huaweicloud.com/ubuntu-ports bionic-backports InRelease Ign:1 https://repo.huaweicloud.com/ubuntu-ports bionic InRelease Ign:2 https://repo.huaweicloud.com/ubuntu-ports bionic-security InRelease Ign:3 https://repo.huaweicloud.com/ubuntu-ports bionic-updates InRelease Ign:4 https://repo.huaweicloud.com/ubuntu-ports bionic-backports InRelease Err:1 https://repo.huaweicloud.com/ubuntu-ports bionic InRelease Temporary failure resolving 'repo.huaweicloud.com' Err:2 https://repo.huaweicloud.com/ubuntu-ports bionic-security InRelease Temporary failure resolving 'repo.huaweicloud.com' Err:3 https://repo.huaweicloud.com/ubuntu-ports bionic-updates InRelease Temporary failure resolving 'repo.huaweicloud.com' Err:4 https://repo.huaweicloud.com/ubuntu-ports bionic-backports InRelease Temporary failure resolving 'repo.huaweicloud.com' Reading package lists... Done W: Failed to fetch https://repo.huaweicloud.com/ubuntu-ports/dists/bionic/InRelease Temporary failure resolving 'repo.huaweicloud.com' W: Failed to fetch https://repo.huaweicloud.com/ubuntu-ports/dists/bionic-security/InRelease Temporary failure resolving 'repo.huaweicloud.com' W: Failed to fetch https://repo.huaweicloud.com/ubuntu-ports/dists/bionic-updates/InRelease Temporary failure resolving 'repo.huaweicloud.com' W: Failed to fetch https://repo.huaweicloud.com/ubuntu-ports/dists/bionic-backports/InRelease Temporary failure resolving 'repo.huaweicloud.com' W: Some index files failed to download. They have been ignored, or old ones used instead.
查看 resolv.conf配置发现DNS 服务器是 10.189.128.2
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 directly to
# all known uplink DNS servers. This file lists all configured search domains.
# 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 10.189.128.2
search ppa openstacklocal
于是我在宿主机上创建一个resolv.conf并将服务器改为
nameserver 8.8.8.8
nameserver 8.8.4.4
然后使用cp resolv.conf squashfs-root/etc将配置文件复制到“squashfs-root/etc/apt”目录下。
再次执行apt-get update就可以
958

被折叠的 条评论
为什么被折叠?



