Accidental Deletion of some /usr/lib files
I accidentally deleted some of my /usr/lib files, and am looking for a way to replace them if they need to be replaced.
It's a little bit of a long story, and I did have a reason, but I miscalculated which files I deleted.
[root@localhost usr]# rm lib -r
and said yes to a bunch of questions before I realized that I didn't want to be deleting what I was deleting. What exactly is in /usr/lib? How can I replace the stuff I deleted.
In case this helps you, I did it again, making sure not to delete anything else, and this is what came out:
[root@localhost usr]# rm -r lib
rm: descend into directory `lib'? y
rm: descend into directory `lib/locale'? y
rm: descend into directory `lib/locale/ar_AE.utf8'? y
rm: remove regular file `lib/locale/ar_AE.utf8/LC_PAPER'?
So that is how far I got. Any help at all would be greatly appreciated.
I am a Linux newbie (using it for about 2 months on and off, about 2 weeks solid though), and I am so lost :cry:
You are in major trouble pal. First off, find out what files have been deleted. The go to rpmfind.net and search for those lib files, download the rpm's and you should be able to get them back. Or go into "install/remove software", and remove your library files, and re-install them.
# rpm -qa|while read pkg;do rpm -V "$pkg";done
This should verify each rpm in your current installation.
If you have any errors, you can reinstall that rpm.
Alternatively you could check your backup and see if you have any file differences... :-)
linuxbot: I'm not sure I understand what you mean. I went to Add/Remove Applications, but I don't know where the Library files would be in that. I looked for them, and I couldn't find them.
fsbooks: okay, I'll try that.
Its been a while since I used redhat. I know in Mandrake you can do a search for library files and you will get a list of all installed /usr/lib or /lib files. Thats why I don't like the redhat installer. No search option.
oh boy, I can tell this is going to be bad:
was I just supposed to put the ones that said missing, or the others too?
:eek: I had no Idea that's what recursive did; I thought it just deleted what you told it to and all subdirectories within that. I didn't know it would search through my whole /usr folder and remove any directory with "lib" in it.
:cry: :cry: :cry:
By the way: I have a feeling I shouldn't close X if I want to get it back. Linuxquestions.org can be used from Lynx, right? Just in worst case scenario, like a power flash or something?
lib is the location of library files. THese files are very important to the programs that use them.
The command you used would not have removed files from /usr/X11R6/lib
something else is happening there.
Are you sure? There were a few other missing files too, but they were in my /usr/java/j2sdk and /usr/java/j2re folders, and I know how to replace them. They were all in subfolders of /usr named lib too.
One question that is killing me: will X run correctly when I type startx? I am running it right now, but I generally reboot every now and then when XMMS starts acting funny.
I just checked the bash history thingy, and I actually typed # rm -r lib
If that makes any difference...
if you are in /usr and type rm -r lib
this means /usr/lib
it will not find anything other than what's in /usr/lib
yes I'm sure
okay, just checking. how will that stuff being gone affect my computer?
and I tried running that command again, and it didn't work. It just froze my TTY1 shell. I did #top and tried to kill it, but no avail.
there are a serious amount of files in /usr/lib
i guess you did not delete them all. I would try to find and replace what's missing in /usr/lib but ignore the others.
the libGL files are likely the result of a video driver update or something like that.
You will not be able to do this through the add remove programs GUI. You need to find the rpms and install them.
you can override errors with --force. I would use the same version as you have installed to get things going, then you can update files if you want.
If you have used up2date since install you should download any rpms that are updated with missing files from redhat network
rpm -q --whatprovides /usr/lib/locale
rpm -i --force glibc-common-2.3.2-27.9
if rpm locks you might need to restart your system to fix it. May be another way if you can find it.
I have RedHat 9.0 CDs 1 and 3 still. If it is on one of them, would that RPM be good to install from?
And yes, I did reinstall my video card drivers, so that would be why.
Thanks a lot man, you've been really helpful to me, and not treating me like I'm crap just because I'm new. It's pretty rare to see that anywhere online these days.
yes you can use the cdrom if you did not use up2date yet to update the rpms from the cd.
|All times are GMT -5. The time now is 01:42 AM.|