如果端口 53 正在使用中,则安装失败。在某些作系统的默认安装中,可能会出现此问题,其中systemd-resolved(DNS 服务器) 正在运行。
要防止出现此问题,请在安装前更改系统配置以使此端口可用。
-
编辑
/etc/systemd/resolved.conf:sudo vi /etc/systemd/resolved.conf -
Add
DNSStubListener=noas the last line in the file and save the file. -
Rename the current
/etc/resolv.conffile:sudo mv /etc/resolv.conf /etc/resolv.conf.orig -
Create a symbolic link for
/etc/resolv.conf:sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.confNote:You might encounter a temporary name resolution error (sudo: unable to resolve host {hostname}: Temporary failure in name resolution), which should be fixed when you restartsystemd-resolvedin the next step. -
Restart the DNS service:
sudo service systemd-resolved restart