Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I occasionally deleted my /lib/

By using LD_PRELOAD I successfully made a link of my /lib/ file in my home folder and now most of the command works (cp, ln, etc...). But I still can not make a new link in /lib/ because sudo still doesn't work

sudo: error while loading shared libraries: cannot open shared object 
file: No such file or directory

Anyone can help me out?

share|improve this question
up vote 1 down vote accepted

I suggest you bypass sudo and reboot into a LiveCD. From it, you should be able to copy the file on your main hard disk to its proper location.

If you have no LiveCD access, you could attempt to use su and login directly as your root user. This may break as sudo has, so this is a bit iffy.

Also, you could attempt to reboot into single user mode (by appending 3 to the kernel's boot options) and login as root directly.

share|improve this answer
yeah, that solved my problem – zhanwu Apr 6 '11 at 15:45

Sudo may not work, but what about su?

$ su
Enter root's password:
# <now you are root>

This of course depends on you having set up a root password at some point in the past and you remembering what it is now ;)

share|improve this answer

You must log in to answer this question.

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