Máy chủ của tôi cài đặt Ubuntu 20.04.3 LTS có lỗi sau khi tôi chạy Sudo netplan thử
:
Đã xảy ra lỗi: đối tượng 'NetplanApply' không có thuộc tính 'trạng thái'
Hoàn nguyên.
Công việc cho systemd-networkd.service không thành công vì quá trình kiểm soát đã thoát với mã lỗi.
Xem "trạng thái systemctl systemd-networkd.service" và "journalctl -xe" để biết chi tiết.
Traceback (cuộc gọi gần đây nhất cuối cùng):
Tệp "/usr/share/netplan/netplan/cli/commands/try_command.py", dòng 87, trong command_try
NetplanApply().command_apply(run_generate=True, sync=True, exit_on_error=False, state_dir=self.state)
Tệp "/usr/share/netplan/netplan/cli/commands/apply.py", dòng 199, trong command_apply
nếu tự.state:
AttributeError: đối tượng 'NetplanApply' không có thuộc tính 'trạng thái'
Trong quá trình xử lý ngoại lệ trên, một ngoại lệ khác đã xảy ra:
Traceback (cuộc gọi gần đây nhất cuối cùng):
Tệp "/usr/sbin/netplan", dòng 23, trong <module>
netplan.main()
Tệp "/usr/share/netplan/netplan/cli/core.py", dòng 50, trong tệp chính
self.run_command()
Tệp "/usr/share/netplan/netplan/cli/utils.py", dòng 310, trong run_command
tự.func()
Tệp "/usr/share/netplan/netplan/cli/commands/try_command.py", dòng 69, đang chạy
self.run_command()
Tệp "/usr/share/netplan/netplan/cli/utils.py", dòng 310, trong run_command
tự.func()
Tệp "/usr/share/netplan/netplan/cli/commands/try_command.py", dòng 98, trong command_try
self.revert()
Tệp "/usr/share/netplan/netplan/cli/commands/try_command.py", dòng 127, hoàn nguyên
NetplanApply().command_apply(run_generate=False, sync=True, exit_on_error=False, state_dir=tempdir)
Tệp "/usr/share/netplan/netplan/cli/commands/apply.py", dòng 249, trong command_apply
utils.systemctl_networkd('start', sync=True, extra_services=netplan_wpa + netplan_ovs)
Tệp "/usr/share/netplan/netplan/cli/utils.py", dòng 177, trong systemctl_networkd
quy trình con.check_call(lệnh)
Tệp "/usr/lib/python3.8/sub process.py", dòng 364, trong check_call
tăng CalledProcessError(retcode, cmd)
sub process.CalledProcessError: Command '['systemctl', 'start', 'systemd-networkd.service', 'netplan-ovs-cleanup.service']' trả về trạng thái thoát khác không 1.
Ban đầu tôi nghĩ rằng mình đã phạm sai lầm khi thực hiện một thay đổi nhỏ đối với /etc/netplan/01-netcfg.yaml
nhưng đã khôi phục về bản gốc và vẫn còn lỗi.
Làm sao tôi có thể giải quyết việc này?