I can't use the shutdown command because the system "Failes to Connect to bus: No such file or directory"

13,441

Solution 1

As it turns out, the issue was with dbus - even though it was installed and up-to-date, it was still broken.

You can reinstall it with

apt-get install --reinstall dbus

Solution 2

Install dbus module on your machine https://launchpad.net/ubuntu/+source/dbus

Share:
13,441

Related videos on Youtube

Native Coder
Author by

Native Coder

Updated on September 18, 2022

Comments

  • Native Coder
    Native Coder over 1 year

    If I use the shutdown command my system throws an error. It happens even if I use shutdown -h or shutdown -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
    

    The only command that I can get to work is sudo shutdown -h now

    Is this expected behavior?

    dbus is installed and up to date...

    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.
    
  • Native Coder
    Native Coder over 6 years
    It's already installed. Just updated the OP to reflect this.
  • Thomas
    Thomas over 6 years
    Ah, didn't see the comments on the question. Maybe you want to rephrase your answer, so it does not start with a question and states something like "...finally it turned out that reinstalling..."