Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

At the beginning I tried to fix the problem of /lib/ld-linux-so.3:No such file or directory when I tried to run some dynamically cross-compiled binaries. So I added some shared binaries to /lib. I changed or deleted some important files in /lib. I know it seems silly.

Now the problem is whenever I want to run an executable binary I get this error:

Error while loading shared libraries:libgcc-s.so.1:cannot open shared object file: No such file or directory.

I have copied libgcc-s.so.1 to /lib from somewhere else. Would anyone give some suggestion to fix /lib? Something to update or install it again? Thanks.

share|improve this question

1 Answer 1

Try booting ubuntu from external media (CD,USB), then mount your root partition in /mnt/root for example. After that try reinstalling the libgcc1 package, the command should be something like:

apt-get --root-directory=/mnt/root install libgcc1

This should fix the libgcc problem, but perhaps you will have other problems with other libraries. Repeat this until you have usable apt-get in your real linux, where you can reinstall the other broken libs.

Hint: if you have your linux working or have another ubuntu linux, you may find the package name for each file you need by running:

apt-file search /lib/libgcc_s.so.1

Hint2: You may find useful the chroot, once you reinstall the missing libraries, you can

chroot /mnt/root /bin/sh

this way you will be able to see if your linux is working correctly without rebooting to your linux and back to external media in case it's not working.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.