0

As I've said in the title, I've stupidly played with my shared libraries without exactly knowing what I was doing. I suddenly couldn't open programs (not even the terminal) so I decided to reboot the computer. On the restart, I faced this black screen of death.

I then tried to boot Ubuntu in recovery mode, but no matter what I tried (either repair broken packages or just to boot into safe mode) nothing made the trick.

Needless to say that I'm a noob with this sort of manipulations and that it should have sufficed me to know that to prevent me from playing around with this stuff.

I've found this answer but I thought it better to ask around before touching anything else. When I follow N0rbert's advice to go on the official Ubuntu packages list, I can't seem to find libz.so.1.

Thank you so much in advance. I've learned my lesson.

1 Answers1

0

It's probably best to back up your files and reinstall Ubuntu. This will ensure that everything is fixed and that you don't forget anything. If you can't, there are a few things to look at.

Reinstalling packages

You can reinstall packages with sudo apt install --reinstall [package-name].

Packages containing libz.so.1

libz.so.1 is in the zlib1g and lib32z1 packages:

$ locate libz.so.1 | grep -E '/libz.so.1$' | xargs -n 1 dpkg -S
zlib1g:i386: /lib/i386-linux-gnu/libz.so.1
zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1
dpkg-query: no path found matching pattern /snap/core/5145/lib/x86_64-linux-gnu/libz.so.1
dpkg-query: no path found matching pattern /snap/core/5328/lib/x86_64-linux-gnu/libz.so.1
dpkg-query: no path found matching pattern /snap/core/5548/lib/x86_64-linux-gnu/libz.so.1
lib32z1: /usr/lib32/libz.so.1

Automatically check most installed files for errors

Once you get APT working properly, install the debsums package and run sudo debsums -s to list any missing or incorrect files that are supposed to be installed on your system (which won't help if you uninstalled them but can help otherwise). This doesn't handle all installed files, but it should handle missing libraries.

See what commands you ran

Your shell's history file will potentially contain the commands that you ran if you used the terminal to do so, so you can possibly find out what you did to change the files. If you're using Bash, you can usually look at it with cat ~/.bash_history.

Chai T. Rex
  • 5,323