![无法在 Ubuntu 20.04 中打开软件属性-gtk](https://linux22.com/image/1025501/%E6%97%A0%E6%B3%95%E5%9C%A8%20Ubuntu%2020.04%20%E4%B8%AD%E6%89%93%E5%BC%80%E8%BD%AF%E4%BB%B6%E5%B1%9E%E6%80%A7-gtk.png)
我无法在 Ubuntu 20.04 中打开 software-properties-gtk。这是我收到的错误:
software-properties-gtk
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 177, in activate_name_owner
return self.get_name_owner(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
return self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'com.ubuntu.SoftwareProperties': no such name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/software-properties-gtk", line 100, in <module>
app = SoftwarePropertiesGtk(datadir=options.data_dir, options=options, file=file)
File "/usr/lib/python3/dist-packages/softwareproperties/gtk/SoftwarePropertiesGtk.py", line 208, in __init__
proxy = bus.get_object("com.ubuntu.SoftwareProperties", "/")
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
return self.ProxyObjectClass(self, bus_name, object_path,
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 250, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 182, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 277, in start_service_by_name
return (True, self.call_blocking(BUS_DAEMON_NAME, BUS_DAEMON_PATH,
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.PermissionsInvalid: The permission of the setuid helper is not correct
答案1
要修复此错误,您必须使用以下命令恢复相关 Dbus 可执行帮助程序的 setuid 权限位:
sudo chmod u+s /usr/lib/dbus-1.0/dbus-daemon-launch-helper
然后再次尝试启动software-properties-gtk
。
还可以考虑通过以下方式检查整个文件系统是否存在错误fsck
。