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.

3
  • Have you remembered the file/ files you played with? And what is your Ubuntu Version?
    – PRATAP
    Oct 7, 2018 at 16:20
  • Many experts learned their way by occasionally breaking their system. As long as you learn from the experience, there is no shame. One simple answer is to use your LiveUSB to backup your data, then clean-install. Alternately, if you want to keep learning and repair your system instead, it might be possible...if you have a history of what you did. There is no "look for problems" tool.
    – user535733
    Oct 7, 2018 at 16:31
  • lol - I've lost count how many times I borked my system learning Linux back in the day. Lucky for you there is a cornucopia of help resources to mine. Like the suggestions say: try to manually repair it or do a fresh install - your call and have fun!
    – user857648
    Oct 7, 2018 at 16:44

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .