LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-25-2006, 06:53 PM   #1
Hunter2
Member
 
Registered: May 2005
Distribution: Slackware 10.2
Posts: 43

Rep: Reputation: 15
Just deleted /usr/lib/pkgconfig by accident.


I'm retarded. I was trying to delete /lib/pkgconfig and replace it with a symlink since pkg-config is hardcoded to look for /usr/lib/pkgconfig, and accidentally deleted /usr/lib/pkgconfig instead.

I really don't want to reinstall Linux, 'cause it's taken me about 2 months now to get (almost) everything working, and I'm using ext3 so apparently I can't undelete.

Can someone with Slackware 10.2 PLEASE tar the contents of their /usr/lib/pkgconfig and post it here? (I can reinstall my custom libs, but I don't even know what I'm missing from the stock libs) Preferably a reasonably 'new' install (so there aren't a bunch of ghost libs for me), but anything will do at this point.

Thanks!
 
Old 06-25-2006, 07:16 PM   #2
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
You're not doomed. If you know a little shell scripting you can grep /var/log/packages for "^usr/lib/pkgconfig" and use that to feed a for loop a list of package names to reinstall with upgradepkg --reinstall, and that'll just reinstall the packages which had pkgconfig files that you nuked. If you don't know enough shell scripting, give it an hour or two and I (or someone else) will surely post the tiny bit of code you need to run. It'll be a little slowish, but it'll work and be less risky than anything else.
 
Old 06-25-2006, 07:20 PM   #3
Hunter2
Member
 
Registered: May 2005
Distribution: Slackware 10.2
Posts: 43

Original Poster
Rep: Reputation: 15
Hmm, that's a great idea. I know a *bit* of shell scripting, so I'll try and poke around a bit first. Thanks!
 
Old 06-25-2006, 08:15 PM   #4
Hunter2
Member
 
Registered: May 2005
Distribution: Slackware 10.2
Posts: 43

Original Poster
Rep: Reputation: 15
Ok, I got it. Thanks! (now I just have to install the rest of the libraries again...)
Code:
for i in /var/log/packages/*
do
if grep usr/lib/pkgconfig $i
then
cp $i /home/kevin/update
fi
done

for i in /home/kevin/update
do
cp `find /mnt/cdrom/slackware/*/\`basename $i\`.tgz` /home/kevin/explode
done

for i in /home/kevin/explode
do
explodepkg $i
done

mv /home/kevin/explode/usr/lib/pkgconfig/* /usr/lib/pkgconfig
 
  


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
deleted video group by accident ncsuapex Slackware 5 04-15-2006 09:18 AM
Oopsy daisy - deleted /usr/lib/perl5/site_perl/ AcidRip no worky WoofDeF Linux - Software 1 03-30-2006 07:00 PM
Deleted ls by accident cake81 Linux - Newbie 4 01-19-2006 05:01 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-29-2004 12:33 AM
deleted cdrom by accident chronos Linux - General 1 12-16-2000 07:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:38 AM.

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
Open Source Consulting | Domain Registration