LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-03-2005, 05:32 PM   #1
craiglinux
LQ Newbie
 
Registered: Apr 2004
Location: Illinois (bt from South Africa :) )
Distribution: Debian
Posts: 10

Rep: Reputation: 0
I moved /lib !!! :( HELP!


Hello,

In a moment of memory lapse and frustration I moved /lib (yes - I know....). Now nothing works.....I can't even move it back

Any advice/help...........please!

Craig

(Running Debian 2.6.10)
 
Old 04-03-2005, 05:35 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,214

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
Try the simple solution first. Boot into recovery mode, and move it back ????.
Knoppix is another option - remember that it mounts everything R/O by default.
 
Old 04-03-2005, 05:37 PM   #3
cyent
Member
 
Registered: Aug 2001
Location: ChristChurch New Zealand
Distribution: Ubuntu
Posts: 351

Rep: Reputation: 78
You're buggered.

But relax, boot into any rescue disk (knoppix whatever) see www.distrowatch.com for an exhaustive list and move it back.

Once you have it working again try

ldd ls
strace ls

to see how vital the /lib directory is to your life....
 
Old 04-03-2005, 08:17 PM   #4
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Ya, as the others have said, boot off a boot disk and move it back... now you know why you should be careful when you are logged in as root eh?
 
Old 04-03-2005, 08:42 PM   #5
craiglinux
LQ Newbie
 
Registered: Apr 2004
Location: Illinois (bt from South Africa :) )
Distribution: Debian
Posts: 10

Original Poster
Rep: Reputation: 0
Ok.

Thanks Guys. I ripped a Knoppix CD - wow it is _REALLY_SWEET!
Booted, changed permissions and moved it back.

I think it is back an running - but I just feel that there is something missing - its seems slow and there were many errors during bootup. Should I / could I / how do I 'regenerate' everything in there?

Thanks
Craig
 
Old 04-03-2005, 08:47 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,288

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
You could try re-running ldconfig to regenerate the linker cache, This may or may not help your problem.
 
Old 04-03-2005, 10:58 PM   #7
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Quote:
Originally posted by btmiller
You could try re-running ldconfig to regenerate the linker cache, This may or may not help your problem.
I'm not sure why I didn't think about that.... if you added the new lib path to /etc/ld.so.conf and ran ldconfig it probably would have done enought to at least allow you to move the directory back to where it belongs (and then of course run ldconfig again).

Of course, you could only do that if you had a statically linked tool that could edit the file...
 
1 members found this post helpful.
Old 09-17-2010, 11:31 PM   #8
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Since this is at the top of the Google results and I just did this...

If you only moved /lib, you can easily recover:

Code:
/NEWLIBPATH/ld-linux.so.3 /bin/mv /NEWLIBPATH /lib
that ld-linux is magic.

Not sure if you also have to run ldconfig - but if needed, you can
Code:
echo /NEWLIBPATH >> /etc/ld.so.conf
and run ldconfig.
 
Old 09-17-2010, 11:37 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,214

Rep: Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952Reputation: 2952
That's a 5 (and a bit) year dormant thread !!!.
 
Old 09-17-2010, 11:46 PM   #10
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
Originally Posted by syg00 View Post
That's a 5 (and a bit) year dormant thread !!!.
First result for "moved /lib" so I figure it's OK
 
Old 10-21-2010, 11:12 AM   #11
kemist
LQ Newbie
 
Registered: Oct 2010
Posts: 1

Rep: Reputation: 0
Alucard, thank you!! I accidentally split /lib in two pieces and your post saved my butt. I had /lib/backup with roughly *half* of the files that used to be in /lib, I moved them instead of copying. By far my biggest forehead slap moment in years.

My situation was different since /lib was in two shards. I couldn't get ld-linus.so.2 (rhel5) to work b/c it seemed to ignore the LD_LIBRARY_PATH variable, to which I added my NEWLIBPATH '/lib:/lib/backup'. I may have been using it wrong but I thought the linker would check LD_LIBRARY_PATH and resolve the dependencies.

I ended up using echo /lib/backup >> etc/ld.so.conf, re-ran ldconfig -v and BOOM back in action.

Thank you btmiller and jtshaw too.
 
Old 07-15-2012, 09:37 AM   #12
jmerkin
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Rep: Reputation: Disabled
It's not quite a 5 year dead thread at this point, but in the recent Arch update /lib moved to /usr/lib and was replaced by symlinks. I and many users have had issues with ownership of files and some have borked their system trying to complete the upgrade. I moved /lib to a backup location, then couldn't really do anything. This worked and I owuld like to keep it near the top of google results for that reason.
 
Old 07-16-2012, 10:57 AM   #13
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177Reputation: 3177
I have no problems with "resuscitating" an old thread when it discusses a problem that has been with us for decades and of course will continue to be with us for as long as computers may last...

... and as long as hapless systems administrators have simultaneous access to unlimited power weaponry and feet.

This will happen to you, just as in fact it has happened to me: (show of hands, please? thank you. I rest my case.)

Quote:
Originally Posted by this WILL, someday, be you:
" - h ... ... ... s - h - i - t ..."
So, may as well keep these "old" pieces of rescue-information ever handy.
 
Old 07-16-2012, 11:05 AM   #14
jmerkin
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Rep: Reputation: Disabled
I guess for future people it would be helpful to be clear about what was helpful. I had moved /lib rather than deleted it. AlucardZero's suggestion:

/NEWLIBPATH/ld-linux.so.3 /bin/mv /NEWLIBPATH /lib

worked for me. I still had a root shell open, so no need to reboot or use a livecd.
 
  


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
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-29-2004 12:33 AM
Bin Moved David@330 Linux - Newbie 3 08-17-2004 01:58 PM
iiimf-client-lib & iiimf-protocol-lib cooldownguy86 Linux - Software 1 06-29-2004 07:25 AM
I moved /lib. Oh my god it died!!!! wolfe2554 Linux - Newbie 3 04-13-2004 02:59 AM
Moved taskbar sdpeelejr Fedora 3 04-02-2004 09:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration