软件和更新无法通过任何方法打开,无论是 GUI 还是命令行。单击图标打开时没有任何反应。如果我执行
sudo software-properties-gtk
,终端中会显示以下错误:
ERROR:dbus.proxies:Introspect error on :1.118:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying
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 222, in __init__
self.backend.Reload();
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
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.ServiceUnknown: The name :1.118 was not provided by any .service files
我尝试重新安装软件属性-gtk,但没有帮助。
编辑 1:我还没有在这台机器上安装过 Python。在我执行完 之后,它就停止工作sudo apt update
了sudo apt upgrade
。
编辑 2:我执行了 N0rbert 提出的解决方案,以下是它在终端上显示的内容。
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 222, in __init__
self.backend.Reload();
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
return self._connection.call_blocking(self._named_service,
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.ServiceUnknown: The name :1.101 was not provided by any .service files
编辑 3: 输出为SYSTEMD_PAGER= systemctl status dbus*
:
● dbus.socket - D-Bus System Message Bus Socket
Loaded: loaded (/lib/systemd/system/dbus.socket; static; vendor preset: enabled)
Active: active (running) since Fri 2022-01-21 12:17:40 IST; 2h 24min ago
Triggers: ● dbus.service
Listen: /run/dbus/system_bus_socket (Stream)
Tasks: 0 (limit: 9283)
Memory: 0B
CGroup: /system.slice/dbus.socket
Jan 21 12:17:40 vivobook systemd[1]: Listening on D-Bus System Message Bus …ket.
● dbus.service - D-Bus System Message Bus
Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
Active: active (running) since Fri 2022-01-21 12:17:40 IST; 2h 24min ago
TriggeredBy: ● dbus.socket
Docs: man:dbus-daemon(1)
Main PID: 777 (dbus-daemon)
Tasks: 1 (limit: 9283)
Memory: 4.9M
CGroup: /system.slice/dbus.service
└─777 /usr/bin/dbus-daemon --system --address=systemd: --nofork --…
Jan 21 14:10:53 vivobook dbus-daemon[777]: [system] Activating via systemd:…ed")
Jan 21 14:10:53 vivobook dbus-daemon[777]: [system] Successfully activated …her'
Jan 21 14:17:44 vivobook dbus-daemon[777]: [system] Activating via systemd:…ed")
Jan 21 14:17:44 vivobook dbus-daemon[777]: [system] Successfully activated …her'
Jan 21 14:26:13 vivobook dbus-daemon[777]: [system] Activating via systemd:…ed")
Jan 21 14:26:13 vivobook dbus-daemon[777]: [system] Successfully activated …her'
Jan 21 14:27:18 vivobook dbus-daemon[777]: [system] Activating via systemd:…ed")
Jan 21 14:27:18 vivobook dbus-daemon[777]: [system] Successfully activated …her'
Jan 21 14:41:47 vivobook dbus-daemon[777]: [system] Activating via systemd:…ed")
Jan 21 14:41:47 vivobook dbus-daemon[777]: [system] Successfully activated …int'
Hint: Some lines were ellipsized, use -l to show in full.
答案1
我建议重新安装所有与 Dbus 相关的软件包
sudo apt update
sudo apt install --reinstall $(dpkg -l | grep ^ii | grep -i dbus | awk '{print $2}')
然后重新启动并重试通过普通software-properties-gtk
命令启动软件和更新,无需sudo
再次操作。