Ubuntu 20.04:无法获取名称“com.ubuntu.SoftwareProperties”的所有者:没有此名称

Ubuntu 20.04:无法获取名称“com.ubuntu.SoftwareProperties”的所有者:没有此名称

我正在尝试打开软件属性-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.ChildExited: Launch helper exited with unknown return code 1

我看到了安装 aptitude 并重新安装 dbus 的建议,我尝试了这个,但即使重新启动系统后它仍然不起作用。

答案1

所提及的软件属性包含在两个包裹中,所以你必须重新安装

sudo apt-get update
sudo apt-get install --reinstall software-properties-common software-properties-gtk

然后重试启动software-properties-gtk

答案2

这已经是很久以前的事了,但这是我的解决方案,以防有人需要它。

运行sudo systemctl status dbus. 您可以在此处看到一些错误。我们需要解决它们才能激活服务“com.ubuntu.SoftwareProperties”或任何其他服务。

例如:就我而言

  • 没有 dbus_bindings。解决方案:转到并创建到您的和 的/usr/lib/python3/dist-packages/链接。_dbus_bindings_dbus_glib_bindings

sudo ln -s _dbus_glib_bindings.cpython-***.so _dbus_glib_bindings.cpython.so

等等。

最后,您可以重新检查 dbus 状态,它应该是这样的:成功激活服务“***”。

相关内容