3

I have accidentally removed my dbus file on my Raspberry Pi 3 Raspbian OS ( full Operating system version) (not raspbian lite). I used the command apt-get remove dbus to do this uninstall of dbus.

After the removal nearly finished (Did not completly finish), about 90% done, the Pi froze so I restarted then it only allowed a terminal on launch. How do I fix this? what commands can I use on the termanal?

This is what I tried to do so far to restore the raspbian OS: (sudo bash was to use root in subsequent commands):


sudo bash 

apt-get install --reinstall dbus

apt-get install dbus

apt-get purge dbus

apt-get install dbus

All the above attempts where entirely unsuccessful and one command even caused a reboot loop for about a hour, untell I pulled the plug on it again.

What other options are there available for me to use? What did I miss? I did some research prior to posting this question, and found that i eather have to reflash image or reinstall desktop interface. How do i do this? I dont want to reflash. Is this my only option?

7
  • 5
    Hopefully someone learnt a lesson or two from this.
    – goldilocks
    Commented Oct 6, 2017 at 13:48
  • 5
    @goldilocks what do you mean? Commented Oct 6, 2017 at 14:17
  • 5
    Do not "accidently" uninstall things unless you understand what they are for. While you might be able to put a linux system together without dbus, it is critical to most contemporary distros (you must have gone to some lengths to get it to uninstall).
    – goldilocks
    Commented Oct 6, 2017 at 14:41
  • 5
    @goldilocks yep I learned my lesson there I did it because I needed space so I uninstalled random stuff Commented Oct 6, 2017 at 15:43
  • 5
    @goldilocks All I did to uninstall by the way was apt-get remove dbus and then type y and enter maybe because I was in root with sudo bash? Commented Oct 6, 2017 at 19:05

1 Answer 1

4

Removing your dbus would have removed most of your installed packages, so I think you would be running a very bare system. I would re-burn an image, but I guess you could try an install a desktop xserver back on it, most likely have to many errors though.

Install desktop on Raspberry Pi

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install --no-install-recommends xserver-xorg

sudo apt-get install --no-install-recommends xinit

sudo apt-get install raspberrypi-ui-mods

sudo apt-get install --no-install-recommends raspberrypi-ui-mods lxterminal gvfs

sudo apt-get install rc-gui
2
  • 5
    Thank you! I will try this! This is what I tried once, but i think I did install Debian-desktop not this one thank you again! Commented Oct 6, 2017 at 14:25
  • 5
    wow no errors, awesome!
    – Dr.Rabbit
    Commented Oct 6, 2017 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.