Results 1 to 7 of 7

Thread: MATLAB and lib/libc.so.6 problem

  1. #1
    Join Date
    Mar 2012
    Location
    Charlotte, NC
    Beans
    65
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question MATLAB and lib/libc.so.6 problem

    So whenever i run matlab on my precise 12.04 32 bit laptop i have to cd to the compete pathway in to my filesystem and then run ./matlab -glnx86 (cumbersome to say the least).

    Anyway, the program will run, but the terminal always displays:

    ./matlab: 1: /usr/local/MATLAB/R2012a_Student/bin/util/oscheck.sh: /lib/libc.so6: not found

    I found someone with the very same problem, and it was resolved, at
    http://askubuntu.com/questions/40416...c-so-6-missing

    they used find | grep libc.so.6 to locate the scripts location. He was then able to create a symlink using

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

    But when I ran find | grep libc.so.6 my terminal displayed no output. How can I find the information I need to create a symbolic link and fix this? Thanks!

  2. #2
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,918
    Distro
    Ubuntu Development Release

    Re: MATLAB and lib/libc.so.6 problem

    Hi

    Quote Originally Posted by Alcidious View Post
    So whenever i run matlab on my precise 12.04 32 bit laptop i have to cd to the compete pathway in to my filesystem and then run ./matlab -glnx86 (cumbersome to say the least).

    Anyway, the program will run, but the terminal always displays:

    ./matlab: 1: /usr/local/MATLAB/R2012a_Student/bin/util/oscheck.sh: /lib/libc.so6: not found

    I found someone with the very same problem, and it was resolved, at
    http://askubuntu.com/questions/40416...c-so-6-missing

    they used find | grep libc.so.6 to locate the scripts location. He was then able to create a symlink using

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

    But when I ran find | grep libc.so.6 my terminal displayed no output. How can I find the information I need to create a symbolic link and fix this? Thanks!
    Welcome to the forums Alcidious.

    First about the find statement. The original poster was using the find command pipped into the grep command.

    You do not really need the pipe as you can specify what to search for using find.
    Code:
    matthew-Aspire-7540:/home/matthew % sudo find / -name "libc.so.6"
    /lib/x86_64-linux-gnu/libc.so.6
    /lib/i386-linux-gnu/libc.so.6
    matthew-Aspire-7540:/home/matthew %
    Second, the find command as typed by the orginal poster of that question i.e (find | grep ...) will start searching in the current working directory and sub directories, so if you are in your home directory you will miss all the system directories where the library files are stored. I suspect this is what happened to you.
    Code:
    matthew-Aspire-7540:/home/matthew % pwd
    /home/matthew
    matthew-Aspire-7540:/home/matthew % find | head -n5
    .
    ./.zshrc
    ./.rtorrent.rc
    ./storage
    ./storage/kernel
    matthew-Aspire-7540:/home/matthew %
    As you can see from above, my current directory is my home directory and the find command starts searching in the "." (currently) directory. This search will miss out all the system directories.

    If you need help creating the symbolic link then post back.

    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

  3. #3
    Join Date
    Mar 2012
    Location
    Charlotte, NC
    Beans
    65
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: MATLAB and lib/libc.so.6 problem

    Thanks so much! That makes perfect sense. But where should I be looking? in the directory my I've put MATLAB? Or should I be searching some other directory in the filesystem?

    -slowly but surely i am improving in linux!

  4. #4
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,918
    Distro
    Ubuntu Development Release

    Re: MATLAB and lib/libc.so.6 problem

    Hi

    Quote Originally Posted by Alcidious View Post
    Thanks so much! That makes perfect sense. But where should I be looking? in the directory my I've put MATLAB? Or should I be searching some other directory in the filesystem?

    -slowly but surely i am improving in linux!
    I am sure you are aware of the caveats as stated in the post you linked regarding the symbolic link.

    What the poster did was to create a symbolic link for libc.so.6 in /lib to point to the correct library in /lib/i386-linux-gnu/libc.so.6.

    Assuming matlab is a 32 bit application then this should work for you (from your first post).

    Code:
    sudo ln -s /lib/i386-linux-gnu/libc.so.6 /lib/libc.so.6
    You can check the link using

    Code:
    ls -l /lib/libc.so.6
    or

    Code:
    readlink -f /lib/libc.so.6
    /lib/i386-linux-gnu/libc.so.6 itself is a symbolic link that points to the correct libc library

    On my system...
    Code:
    matthew-Aspire-7540:/home/matthew/Music % ls -l /lib/i386-linux-gnu/libc.so.6
    lrwxrwxrwx 1 root root 12 Sep 12 13:27 /lib/i386-linux-gnu/libc.so.6 -> libc-2.15.so*
    matthew-Aspire-7540:/home/matthew/Music % readlink -f /lib/i386-linux-gnu/libc.so.6
    /lib/i386-linux-gnu/libc-2.15.so
    matthew-Aspire-7540:/home/matthew/Music %
    Where on you file system is matlab installed ?

    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

  5. #5
    Join Date
    Mar 2012
    Location
    Charlotte, NC
    Beans
    65
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: MATLAB and lib/libc.so.6 problem

    MATLAB is installed in /usr/local/MATLAB

    but to access it i have to cd to /usr/local/MATLAB/R2012a_Student/bin
    and then type ./matlab -glnx86

    I would love to not have to do that. But I was able to create the symlink, finally, but I tested to it with both commands, and I got two slightly different answers? When I ran matlab the libc-not found error is no longer there, hurray! If everything is good to go, then thanks so much! And on to the next little issue...


    alcidious42@IronMan:~$ ls -l /lib/libc.so.6
    lrwxrwxrwx 1 root root 29 Sep 25 01:00 /lib/libc.so.6 -> /lib/i386-linux-gnu/libc.so.6
    alcidious42@IronMan:~$ readlink -f /lib/libc.so.6
    /lib/i386-linux-gnu/libc-2.15.so

  6. #6
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,918
    Distro
    Ubuntu Development Release

    Re: MATLAB and lib/libc.so.6 problem

    Hi

    Add this path ( /usr/local/MATLAB/R2012a_Student/bin ) to your PATH environmental variable.

    Copy and paste this into the terminal.

    Code:
    echo 'export PATH=$PATH:/usr/local/MATLAB/R2012a_Student/bin' >> ~/.bashrc
    You should then not have to navigate to the directory. (or you could create a launcher)

    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

  7. #7
    Join Date
    Mar 2012
    Location
    Charlotte, NC
    Beans
    65
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: MATLAB and lib/libc.so.6 problem

    Thanks for all your help matt!

Tags for this Thread

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
  •