Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
HELP i wiped my ld.so.conf file out with cat.
Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: HELP i wiped my ld.so.conf file out with cat.

  1. #1
    Senior Member comtux's Avatar
    Join Date
    Sep 2004
    Location
    Wilkes Barre Pa
    Posts
    342

    HELP i wiped my ld.so.conf file out with cat.

    HELP anyone i am scared to reboot i wiped my ld.so.conf file out is there a magic command or way for me to recover from this mess. ops:

  2. #2
    Associate
    Join Date
    Jan 2005
    Location
    Mississauga,ON
    Posts
    40

    Re: HELP i wiped my ld.so.conf file out with cat.

    What distro are you using?

    What apps do you have installed - eg - Gnome,KDE,Mozilla,etc

    You are going to have to manually rebuild the ld.so.conf file so do not reboot your system.

    At the very least it will need /lib /usr/lib /usr/X11R6/lib.

    You can use echo to rebuild it like so:

    echo "/lib" > /etc/ld.so.conf <---- start it fresh
    echo "/usr/lib" >> /etc/ld.so.conf <-------append to the file
    echo "/usr/X11R6/lib" >> /etc/ld.so.conf

    the >> means append and the > means start from new.

    You can view the current libraries like so:

    ldconfig -p <---this prints out the lib links which you can extract the lib directories from that you need to put in the ld.so.conf

    or dump it to a file:

    ldconfig -p > temp.ld

    ld.so.conf only needs the directory names and it will link the libs from there. The ld.so.cache is what is getting printed out with ldconfig -p.

    You can create a script with bash to automate this a bit and you can use cut and awk to get the names of the directories and then uniq to strip the dups. You can then dump these to a new ld.so.conf file.

    If you want, I can come up with a script to do this if you are not that familiar with bash - just let me know.

  3. #3
    Senior Member comtux's Avatar
    Join Date
    Sep 2004
    Location
    Wilkes Barre Pa
    Posts
    342

    Re: HELP i wiped my ld.so.conf file out with cat.

    I am useing a highly custom Lfs/slack 10 distro that i built my self.
    I have
    Kde 3.2.3 & QT 3.3.2
    Firefox
    Openoffice
    Inkscape
    Gimp
    Java
    NetBeans
    Gambas

    That's about it you could make a shell script if you wan't and post it and then make a KB submission for others to referance.

    I have everything ldconfig -p prints out but i am still missing everything above.

    My ld.so.conf

    /lib
    /usr/lib
    /usr/local/lib
    /usr/X11R6/lib
    /usr/i486-slackware-linux/lib


    After all of this i am going to build an automated ld.so.conf recover type appt. lol

  4. #4
    Associate
    Join Date
    Jan 2005
    Location
    Mississauga,ON
    Posts
    40

    Re: HELP i wiped my ld.so.conf file out with cat.

    Here it is - quick and dirty to get a new ld.so.conf from your ld cache:


    --------begin below this line--------------
    #!/bin/bash

    ldconfig -p > out.txt
    cat out.txt | cut -d ">" -f 2 > out2.txt
    cat out2.txt | while read LINE; do
    echo ${LINE%/**} >> ldsoconf
    done
    sort ldsoconf | uniq >> ldsoconf2
    cat ldsoconf2 | awk '{ print $1}' | grep "/" >ld.so.conf
    rm -f out.txt out2.txt ldsoconf ldsoconf2
    -------------end above this line------------

    I tried here on my test box and it works fine.

    If any of you were on Tinyminds - my nickname over there was Fragadelic.

    I use Tigger on all things linux so I decided to do it here too.

    EDIT - made it remove the line that said how many libs were loaded so it will make a ready-made ld.so.conf - you can use this for your auto-regenerating ld.so.conf file.

  5. #5
    Senior Member comtux's Avatar
    Join Date
    Sep 2004
    Location
    Wilkes Barre Pa
    Posts
    342

    Re: HELP i wiped my ld.so.conf file out with cat.

    Great everything seems to work..
    You are the poster of the hour man thanks.
    Question will this work in every case?
    If not is there a way to make it work in every case?

  6. #6
    Associate
    Join Date
    Jan 2005
    Location
    Mississauga,ON
    Posts
    40

    Re: HELP i wiped my ld.so.conf file out with cat.

    Check the post again - I just editted it to make a better file. I called it "ldrebuild" here when I made it.

    Yes it will work on any linux box that has bash,uniq,cut,sort and awk commands available which is almost all distros - even small ones like feather which is what I created it on.

  7. #7
    Senior Member comtux's Avatar
    Join Date
    Sep 2004
    Location
    Wilkes Barre Pa
    Posts
    342
    What kind of package manager are you useing?
    tar.gz
    tgz
    deb
    rpm
    urpm
    ebuild

    Oh ya i had to add this to my ld.so.conf
    /usr/lib/qt-3.3.2/lib

    Wouldn't
    slocate lib > temp.ld
    work better?

  8. #8
    Associate
    Join Date
    Jan 2005
    Location
    Mississauga,ON
    Posts
    40

    Re: HELP i wiped my ld.so.conf file out with cat.

    I use 4 distros right now:

    feather linux - laptop, test desktop at work 300M installed
    vector linux - I am a VL developer - used to be the Chief Architect of the SOHO branch - no time for that much dedication now but I still help them out
    slackware - server at work - nfs,samba,tftp,ftp,printing - 580M installed
    fedora - home server - soon to be replaced by slack

    I really prefer either tgz with slapt-get or deb with apt-get.

    I am a CLI freak so I do as much as I can there including installing packages and upgrading,etc.

    Been using linux since '97 - developing with VL since 2002.

  9. #9
    Associate
    Join Date
    Jan 2005
    Location
    Mississauga,ON
    Posts
    40

    Re: HELP i wiped my ld.so.conf file out with cat.

    ldconfig is the best bet as it will provide you with all the actual libraries that are loaded in ld.so.cache. Not sure why it missed your qt stuff though. It does require that ldconfig wasn't run after the ld.so.conf file was corrupted though.

    not all libs for all apps are in a lib directory though but you can try that and see how it compares to the ldconfig -p.

  10. #10
    Senior Member comtux's Avatar
    Join Date
    Sep 2004
    Location
    Wilkes Barre Pa
    Posts
    342

    Ok you are my new best friend.
    Search for my post.
    I tried a test run and ahh it is better your way i am also not sure whty it mist my qt dir but ill figure it out and i did run ldconfig after i corrupted my ld.so.conf file

Similar Threads

  1. test samba.conf file
    By cliff in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 10-13-2005, 03:12 AM
  2. smb.conf example
    By trickster in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 06-21-2004, 11:48 PM
  3. DNS /etc/host.conf
    By Rastar in forum Linux - Hardware, Networking & Security
    Replies: 1
    Last Post: 09-20-2002, 11:48 PM
  4. vga=792 in /etc/lilo.conf
    By wing328 in forum Linux - General Topics
    Replies: 1
    Last Post: 06-03-2002, 03:11 PM
  5. My pf.conf file
    By in forum Linux - Software, Applications & Programming
    Replies: 9
    Last Post: 03-28-2002, 05:46 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •