While I was installing MRTG, by mistake I have deleted /usr/lib/*.so.*
and /usr/lib/*.so
I am now unable to boot-up my system now, it gets stuck at the splash screen and when I press PAGEDOWN button I can see there are several things which are failing to load.
However, DHCP and WebMin are running and from Webmin I can see the system logs which tells me that cups is not loading because libpipeline.so.1
Is missing and several others.
My computer is running 11.04
Best Answer
Since you've only deleted
/usr/lib/*
and not/lib/*
, you can probably recover. I think all the programs you critically need to recover your system only use libraries from/usr/lib
.Boot to a text login prompt. If the normal boot doesn't give you a
login:
prompt in text mode, boot with only minimum services. Press and hold Shift when your computer starts to show the Grub prompt; you need to press the key after the BIOS has initialized the keyboard but before Grub is loaded, which on some machines leaves only a small time window and may require several attemps. At the Grub prompt, press Down to highlight the single-user mode boot entry and boot that.Once you have a command line, run
apt-get --reinstall install PACKAGE1 PACKAGE2 …
to reinstall the packages that have files in/usr/lib
. You can run this shell snippet to get the list of names of packages to reinstall:Some package installation scripts may require libraries from other packages to be present, so you may need to run the reinstallations in a particular order. If you find that a package's installation scripts are trying to use a particular program, you can find out which libraries this program needs with
ldd
. For example, this indicates that python is missing three libraries that you need to reinstall:dpkg -S /usr/lib/libz.so.1
reveals that this file comes fromzlib1g
, and so on.If you find that
apt-get
is unable to download packages, first download a few key packages from a live CD.zlib1g
andlibssl0.9.8
are two packages you're very likely to need early on.