无法应用网络设置,您可能无法连接

无法应用网络设置,您可能无法连接

在我的笔记本电脑 omen 17-cbO247 core i7 上,我最近将系统从 Ubuntu 18.04 升级到 Ubuntu 20.04。

它运行几乎完美,但重新启动系统后,我收到以下消息:

Failed to apply network settings
you might not be able to connect to the Bluetooth network via this machine

g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.Failed: Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/blueman/main/DbusService.py”, line 124, in _handle_method_call
ok(method(*args))
File “/usr/lib/python3/dist-packages/blueman/plugins/mechanism/Network.py”, line 57, in _reload_network
nc.apply_settings()
File “/usr/lib/python3/dist-packages/blueman/main/NetConf.py”, line 384, in apply_settings
self.del_ipt_rules()
File “/usr/lib/python3/dist-packages/blueman/main/NetConf.py”, line 329, in del_ipt_rules
call(["/sbin/iptables", “-t”, table, “-D”, chain] + rule.split(" "))
File “/usr/lib/python3.8/subprocess.py”, line 340, in call
with Popen(*popenargs, **kwargs) as p:
File “/usr/lib/python3.8/subprocess.py”, line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib/python3.8/subprocess.py”, line 1702, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘/sbin/iptables’
(0)

请帮我解决这个问题。

答案1

您错过了/sbin/iptables可执行文件。在 20.04 LTS 的全新安装中,它是一个由软件包安装程序提供或创建的符号链接iptables。完整的链接链是/sbin/iptables/etc/alternatives/iptables/usr/sbin/iptables-legacy

因此你需要iptables通过以下方式重新安装该包

sudo apt-get install --reinstall iptables

然后重新启动 BlueMan 或重启。

相关内容