While trying to fix an issue with Python, I accidentally blew away my libz.so.1
binary by symlinking over it. Now a bunch of stuff, including apt-get
won't work. The damage is limited to just libz.so.1 (which was pointing to libz.so.1.2.8
) so I should be able to fix it by just finding the x86_64 binary and dropping it back in place, but all I can find is the source and I can't get that to compile. I'm on Xenial. Where can I find a compiled binary?
Restore libz.so.1 – How to Guide for Ubuntu 16.04
16.04aptshared library
Best Answer
The correct way to fix this problem is to download needed package by hand, then install or extract it to the system. Of course you can perform such actions from LiveCD/LiveUSB.
How to solve such problems:
Enter missed file name in Search the contents of packages (in our case
libz.so.1.2.8
) specifying target Distribution (xenial
in our case) and CPU Architecture (amd64
):Click Search, it will show the results page:
Then click on the
zlib1g
linkIn Download section click
amd64
:On opened page select nearest mirror, (copy link or download deb-file by browser)
Try to install downloaded package to the system:
If it does not work - extract it directly to filesystem:
And then for sure reinstall it with APT: