Score:0

How to reinstall missing libraries to repair ubuntu 20.10 after stupidly purging some libraries and shutting down

in flag

I'm fairly new to linux and I was trying ti install samba in order to use to share files with a Windows 10 qemu/kvm virtual machine. Samba though wouldn't be installed and I couldn't figure out why. Searching through the forum I stupidly followed some guy's instructions where he would autoremove some library but with the --purge flag.

Almost immediately I realized that wasn't a wise move since it had started removing libs like pulse audio and gnome. I wasn't worried because I found in the logs the libraries that had been removed and I was in the process of writing a mini C++ program to take the log file as input and generate a bash file to re-install thise libraries.

Meanwhile though I had to move to a different location, so I closed the lid of the laptop. And from there things went south. When I reopened the lid, the screen wouldn't let me authenticate (keyboard was inaccessible and the login couldn't receive any input), so I had to reboot, hoping for a miracle.

Needless to say that the miracle didn't came. I'm in the process of taking a backup through the SupportAssist OS Recocery that Dell ships with. I also have access to grub.

Is there any way to save the situation without freshly reinstalling the OS?

Organic Marble avatar
us flag
It would be a lot easier to just reinstall and reload your backups, especially if this is a new install.
Ilias Kapareliotis avatar
in flag
It isn't a new install, that's why I'm trying to find ways to avoid that.
Nmath avatar
ng flag
You are nearing the end of the grace period to upgrade to 21.04 so a reinstall may be the best path. `apt` commands will ask for confirmation so this is avoidable in the future if you make sure that you pay attention to the terminal output and don't blindly follow instructions you found from some source. Always research commands before running them if you don't know what they do.
Score:3
cn flag

What may help is to boot into a recovery prompt with network support, and then reinstall the "ubuntu-desktop" metapackage. That metapackage is a package that has as dependency everything deemed part of the standard Ubuntu desktop. Installing it back will pull back in all required packages that were removed.

This question details how to boot into a recovery prompt. Once you are at the prompt, issue the command

sudo apt install ubuntu-desktop

When done, sudo reboot will cause a reboot.

Ilias Kapareliotis avatar
in flag
1000 thank you and more, you saved the situation. Had to install libpulse0=1:13.99.2-1ubuntu1 and pulseaudio in order to make ubuntu-desktop work but after that it worked like a charm. God bless you!
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.