没有办法让网络在新的 ubuntu 服务器上工作。这是 netplan yaml 文件:
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config:disabled}
network:
version: 2
ethernets:
enp0s3:
addresses: [192.168.0.183/24]
gateway4: 192.168.0.250
dhcp4: false
nameservers:
addresses: [8.8.8.8,8.8.4.4]
optional: true
Run Code Online (Sandbox Code Playgroud)
运行 netplan --debug apply 我得到:
网络定义错误 //etc/netplan/50-cloud-init.yaml 第 1 行第 1 列:预期映射
我要疯了,以前这么简单!为什么不起作用?这个错误是什么意思?