Thursday, September 28, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  5] [ 0]  / answers: 1 / hits: 5186  / 1 Year ago, mon, october 3, 2022, 11:10:41

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 missing and several others.

My computer is running 11.04

More From » dhcp


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:

egrep -l '/usr/lib/[^/]*.so.' /var/lib/dpkg/info/a*.list |
sed -e 's!^/var/lib/dpkg/info/!!' -e 's!.list$!!'

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:

$ ldd /usr/bin/python | grep 'not found' => not found => not found => not found

dpkg -S /usr/lib/ reveals that this file comes from zlib1g, 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 and libssl0.9.8 are two packages you're very likely to need early on.

[#44749] Tuesday, October 4, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 161
Total Questions: 106
Total Answers: 118

Location: Cambodia
Member since Thu, Oct 7, 2021
2 Years ago