Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Help with symlink

  1. #1
    Join Date
    Sep 2009
    Location
    surrey uk
    Beans
    2,057
    Distro
    Ubuntu 11.04 Natty Narwhal

    Help with symlink

    I have to have libc.so.6 in lib, I found libc.so.6 in /lib/i386-linux-gnu/libc.so.6 I hope I created a correct symlink to lib
    Code:
    ln -n /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6
    . The file libc.so.6 now shows in red /lib/libc.so.6 I hope this is correct for a symlinked file? Also how do you remove the symlink just incase

    I also created symlink as root

    Last edited by spiky001; October 9th, 2011 at 07:46 PM.
    DUAL BOOT XP & Natty, Trying LFS

  2. #2
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Help with symlink

    Hi

    Quote Originally Posted by spiky001 View Post
    I have to have libc.so.6 in lib, I found libc.so.6 in /lib/i386-linux-gnu/libc.so.6 I hope I created a correct symlink to lib
    Code:
    ln -n /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6
    . The file libc.so.6 now shows in red /lib/libc.so.6 I hope this is correct for a symlinked file?

    I use -s for as symlinked file.

    Code:
    ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6

    That is fine for a symlink. That will create a symlink in
    /lib/libc.so.6 that points to /lib/i386-linux-gnu/libc.so.6
    You can test this with

    Code:
    readlink -f /lib/libc.so.6

    Also how do you remove the symlink just incase

    Delete it using rm.

    Kind regards
    Last edited by matt_symes; October 9th, 2011 at 08:08 PM. Reason: Browser crashed half way through saving
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  3. #3
    Join Date
    Sep 2009
    Location
    surrey uk
    Beans
    2,057
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Help with symlink

    Ok as i created the link as root due to permissions Can I chmod it to the user? if so how?
    DUAL BOOT XP & Natty, Trying LFS

  4. #4
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Help with symlink

    Hi

    Just use the standard chown with the -h switch so the symlink does not get dereferenced.

    Code:
    sudo chown -h user:user /path/to/symlink
    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  5. #5
    Join Date
    Sep 2009
    Location
    surrey uk
    Beans
    2,057
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Help with symlink

    Ok that changed the symlink to the user thks, But my script fails,here . It fails with this
    Code:
    /home/spiky/bin/version-check.sh: line 22: /lib/libc.so.6: No such file or directory
    . I cant really chown lib directory
    DUAL BOOT XP & Natty, Trying LFS

  6. #6
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Help with symlink

    Hi

    Open a terminal and type

    Code:
    ls -l /lib/libc.*
    Post the results back here.

    Can you also post your script ?

    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  7. #7
    Join Date
    Sep 2009
    Location
    surrey uk
    Beans
    2,057
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Help with symlink

    Code:
    lrwxrwxrwx 2 spiky spiky 12 2011-06-19 16:11 /lib/libc.so.6 -> libc-2.13.so
    http://www.linuxfromscratch.org/lfs/.../hostreqs.html
    DUAL BOOT XP & Natty, Trying LFS

  8. #8
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Help with symlink

    Hi

    LFS eh ? I hope you have plenty of coffee

    Quote Originally Posted by spiky001 View Post
    Code:
    lrwxrwxrwx 2 spiky spiky 12 2011-06-19 16:11 /lib/libc.so.6 -> libc-2.13.so
    Did you create the link with the -n switch or the -s switch ?

    ie ln -n or ln -s ?

    Looks like you did not use the -s option. Try it with that.
    Here is mine
    Code:
    matthew@matthew-laptop:~$ ls -l /lib/libc.*
    lrwxrwxrwx 1 root root 14 2011-05-24 13:59 /lib/libc.so.6 -> libc-2.11.1.so
    matthew@matthew-laptop:~$
    My link is owned by root though.

    Kind regards
    Last edited by matt_symes; October 9th, 2011 at 10:18 PM.
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

  9. #9
    Join Date
    Sep 2009
    Location
    surrey uk
    Beans
    2,057
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Help with symlink

    I used the n switch, When i run the script I get the failure /lib/libc.so.6: No such file or directory
    DUAL BOOT XP & Natty, Trying LFS

  10. #10
    Join Date
    May 2010
    Location
    uk
    Beans
    9,249
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Help with symlink

    Hi

    When i run the script I get the failure /lib/libc.so.6: No such file or directory
    I don't quite get that. I assume it's the -n switch but..

    What do you get if you open a terminal and type

    Code:
    /lib/libc.so.6 --version
    and

    Code:
    readlink -f /lib/libc.so.6
    Kind regards
    If you believe everything you read, you better not read. ~ Japanese Proverb

    If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain

    Thinking about becoming an Ubuntu Member?

Page 1 of 2 12 LastLast

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
  •