LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices



Reply
 
Search this Thread
Old 06-26-2006, 06:07 PM   #1
ilyaz121
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
chroot: error while loading shared libraries: /lib/libc.so.6: file too short


Hi,
I was trying to check the library 'libc.so.6' using VI editor on Debian OS. When I tried to close VI editor, it got stuck and When I restarted the system, I got this error

chroot: error while loading shared libraries: /lib/libc.so.6: file too short
Kernel panic: Attempted to kill init!

Do I need to re-install the OS or is there any other method to overcome this problem.

Does anyone know the solution? Please help me.

Thanks in advance.
Kind Regards,
Ilyaz
 
Old 06-27-2006, 03:47 AM   #2
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 53
No need to reinstall, you can download the .deb from debian, extract it, take the file you want and put it in /lib

For this you need:
->To know which version of libc6 you have to take (ls /lib/libc* will tell you) Which release of debian do you have.
->An os that can write to your /lib, maybe a livecd

Tell me if it goes well.
 
Old 06-27-2006, 10:11 AM   #3
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
Quote:
An os that can write to your /lib, maybe a livecd
Preferably a debian based livecd, ie one that has dpkg or some other way of manipulating .deb packages.
 
Old 06-27-2006, 10:35 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 53
Quote:
Originally Posted by Daws
Preferably a debian based livecd, ie one that has dpkg or some other way of manipulating .deb packages.
No need for dpkg, .deb is the old ar linux format:

Example on my machine (unstable):
Code:
bork@freedom:/tmp$ ll /lib/libc.so.6
lrwxrwxrwx 1 root root 13 2006-06-10 09:20 /lib/libc.so.6 -> libc-2.3.6.so
bork@freedom:/tmp$ wget http://ftp.fr.debian.org/debian/pool/main/g/glibc/libc6_2.3.6-15_i386.deb
bork@freedom:/tmp$ ar x libc6_2.3.6-15_i386.deb data.tar.gz
bork@freedom:/tmp$ tar xvjf data.tar.gz
root@freedom:/tmp# mount /mnt/pathtobrokendeb
root@freedom:/tmp# cp /mnt/pathtobrokendeb/lib/libc-2.3.6.so /mnt/pathtobrokendeb/lib/oldlibc-2.3.6.so
root@freedom:/tmp# cp /tmp/lib/libc-2.3.6.so /mnt/pathtobrokendeb/lib
Should work

edit: ermm ar is maybe not present if there is no compilation suite (gcc,..).
then dpkg
or ark (kde default decompressor)

Last edited by nx5000; 06-27-2006 at 10:38 AM.
 
Old 06-27-2006, 01:38 PM   #5
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 32
I learn something new every day on LQ...
 
Old 06-30-2006, 04:06 PM   #6
ilyaz121
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you very much for your help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
syslogd: error while loading shared libraries: /lib/ld-linux.so.2: cannot apply addit dsids Linux - Newbie 1 04-15-2006 03:14 AM
syslogd: error while loading shared libraries: /lib/ld-linux.so.2: cannot apply addit dsids Linux - Security 1 04-14-2006 05:24 AM
aim: error while loading shared libraries: /usr/lib/libgdk-1.2.so.0: undefined symbol dr_zayus69 Linux - Software 1 12-11-2004 10:10 PM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM


All times are GMT -5. The time now is 03:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration