我无法使用关机命令,因为系统“无法连接到总线:没有此文件或目录”

我无法使用关机命令,因为系统“无法连接到总线:没有此文件或目录”

如果我使用该shutdown命令,系统会抛出错误。即使我使用shutdown -hshutdown -h now

user@Domain:~$ sudo shutdown
[sudo] password for user:
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory
user@Domain:~$ shutdown -h
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory
user@Domain:~$ shutdown -h now
Failed to connect to bus: No such file or directory

我唯一能工作的命令是sudo shutdown -h now

这是预期的行为吗?

dbus 已安装并且是最新的...

user@Domain:~$ sudo apt-get install dbus
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
dbus is already the newest version (1.10.6-1ubuntu3.3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

答案1

事实证明,问题在于dbus——即使它已安装并更新,但它仍然损坏。

你可以使用以下命令重新安装

apt-get install --reinstall dbus

答案2

dbus在您的机器上 安装模块https://launchpad.net/ubuntu/+source/dbus

相关内容