我正在为我们的工作站设置 MAAS,一切进展顺利!我已经用它部署了一个测试虚拟机。唯一不起作用的是 apt。
我无法执行apt update
。它查找172-16-0-0--16.maas-internal
但我不知道它从哪里获取它。
这是完整的输出:
~# apt update
Err:1 http://packages.microsoft.com/repos/vscode stable InRelease
Could not resolve '172-16-0-0--16.maas-internal'
Err:2 http://aptly bionic InRelease
Could not resolve '172-16-0-0--16.maas-internal'
Err:3 http://aptly bionic-updates InRelease
Could not resolve '172-16-0-0--16.maas-internal'
Err:4 http://aptly bionic-security InRelease
Could not resolve '172-16-0-0--16.maas-internal'
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: Failed to fetch http://aptly/dists/bionic/InRelease Could not resolve '172-16-0-0--16.maas-internal'
W: Failed to fetch http://aptly/dists/bionic-updates/InRelease Could not resolve '172-16-0-0--16.maas-internal'
W: Failed to fetch http://aptly/dists/bionic-security/InRelease Could not resolve '172-16-0-0--16.maas-internal'
W: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/InRelease Could not resolve '172-16-0-0--16.maas-internal'
W: Some index files failed to download. They have been ignored, or old ones used instead.
这是我的/etc/apt/sources.list
文件:
# Aptly
deb [trusted=yes arch=amd64] http://aptly/ bionic main universe
deb [trusted=yes arch=amd64] http://aptly/ bionic-updates main universe
deb [trusted=yes arch=amd64] http://aptly/ bionic-security main universe
我也尝试使用默认设置sources.list
,但出现了同样的错误。
该/etc/resolv.conf
文件仅指向我的 DNS 服务器。
无论我把什么放入sources.list
文件,它都会一直抱怨172-16-0-0--16.maas-internal
。它为什么要寻找172-16-0-0--16.maas-internal
?它是什么?我可以绕过它吗?我必须设置新的 DNS 记录吗?我怎样才能让 apt 正常工作?
非常感谢!
答案1
不得不删除/etc/apt/apt.conf.d/90curtin-aptproxy
答案2
看起来您已编辑了网络配置。如果您已编辑,请尝试以下步骤:
- 您需要将 MAAS IP 地址设置为您尝试连接的所有节点的 DNS
apt update
。
例子
enp3:
match:
macaddress: 62:34:0f:91:1b:e2
addresses:
- 172.168.0.12/24
gateway4: 172.168.0.10
mtu: 1500
nameservers:
addresses:
- 172.168.0.16 #<<<< IP OF THE MAAS INTERFACE #
set-name: enp3