Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to open Matlab (32 bit version) in 12.04, with

matlab -glnx86

but it returns

/usr/local/bin/matlab: 1: /usr/local/temp/bin/util/oscheck.sh: /lib/libc.so.6: not found
/usr/local/temp/bin/glnx86/MATLAB: error while loading shared libraries: libXpm.so.4: cannot open shared object file: No such file or directory

Any ideas? I've seen similar questions where it turned out that the needed library was moved and had to be linked to the right place, but I'm a pretty new user and I don't know how to check for that or fix it.

share|improve this question
    
those files are provided by multiarch-support and they're located in /usr/lib/i386-linux-gnu/. I don't have a copy of Matlab, so I can't test. – RobotHumans Apr 29 '12 at 1:02
    
Possible answer: askubuntu.com/questions/125649/reboot-during-update-glibc-error Sorry, no longer using Matlab, so can't test myself. – david6 Apr 29 '12 at 1:53
    
OK, after running Update Manager again, it works now. Thanks though! – E. Wesson Apr 29 '12 at 17:05

What about

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

Worked for me!

Regards

share|improve this answer

So I received the exact same error after updating from ubuntu 11.10 to 12.04 both 64bit using matlab 2010a student version. To solve this problem I followed these five steps

  1. sudo ln -s /lib/x86_64-linux-gnu/libc-2.15.so /lib/libc.so.6
  2. Install libXpm4:i386.
  3. Install libXmu6:i386.
  4. Install libXp6:i386.
  5. Install libXtst6:i386.

Here the first step is performed from the Terminal (Ctrl+Alt+T). For the last four steps, I went to the Software Center and searched for the package to be installed (e.g., libXpm4:i386) and clicked Install.

A long form version of what led me to these five actions are described below if anyone is interested or runs into a similar but not identical problem and is looking for insight:

As suggested I followed the instructions for the student version here. I ran the command:

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

With the first error resolved I still had the error about libXpm.so.4. I tried to make may different symbolic links to the file libXpm.so.4 found elsewhere on my system to the one in /lib but got the error wrong ELF class: ELFCLASS64. I think what is going wrong is that I am missing some 32-bit versions of libraries need by the 32-bit Matlab I am running. With this in mind, I went to the Software Center and searched for libXpm and installed libXpm4:i386 which appeared to be a 32-bit version of libXpm4 which was already installed (i386 denotes a 32-bit architecture). This solved the last of the two messages above.

Attempting to run Matlab again, I then got a similar error but with libXmu.so.6 not found. I again went back to the Software Center and searched libXmu and installed libXmu6:i386. This action solved the new error.

Again running matlab -glnx86, I got the error libXp.so.6 not found, so I searched for libXp in the Software Center and installed libXp6:i386. This solved this latest error.

Lastly, I ran matlab -glnx86 and the splash screen appeared but it quickly closed giving the error Unable to initialize com.mathworks.mwswing.MJStartup. After searching the web I found this page, which suggested installing libXtst so, one last time, I went to the Software Center and installed libXtst6:i386.

I just was trying to get my Matlab working so I do not know exactly why this fixed it but my hypothesis is that the update removed some 32-bit versions of files still needed by Matlab so I just went back and manually re-installed them.

Hope this helps!

share|improve this answer

you could try follow this link , I found it helpful. http://www.emmalzhang.com/robotTech/2012/05/10/matlab-starting-error-in-ubuntu-12-04-libc-so-6-not-found/ MATLAB Starting Error in Ubuntu 12.04: libc.so.6: not found

share|improve this answer
4  
Please add necessary information on the answer – Anwar Shah Feb 20 '13 at 8:14

From the official page:

Subject:

Why do I get a libc.so.6: not found error when launching MATLAB in Ubuntu?

Problem Description:

I get the following error when I run MATLAB in Ubuntu:

/usr/local/MATLAB/R2011a/bin/util/oscheck.sh: 605: /lib/libc.so.6: not found

Solution:

To resolve this problem, open a Terminal window and use the commands below depending on your OS architecture:

For 64-bit Ubuntu:

sudo ln -s /lib64/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6

For 32-bit Ubuntu:

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

For using the Student Version on 64-bit:

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

Afterwards try starting MATLAB again.

share|improve this answer

For missing libXp.so.6, add:

deb http://security.ubuntu.com/ubuntu precise-security main

to your /etc/apt/sources.list.

then run

sudo apt update   
sudo apt install libxp6
share|improve this answer

I found out a workaround. When I run /usr/local/MATLAB/R2011a/bin/matlab, nothing happens, only the first screen of MATLAB is shown and then disappears.

If I choose "Run in Terminal", the error message appears in a terminal window, BUT, the difference is that MATLAB launches and works.

This is far from perfect, but at least lets me run the program.

share|improve this answer
1  
Welcome to Ask Ubuntu! Please only use the Answer section for actual answers. If you have a new question, please ask it by clicking the Ask Question button. If you have sufficient reputation, you may upvote the question. Alternatively, "star" it as a favorite and you will be notified of any new answers. – user98085 Feb 10 '13 at 19:30
2  
Jugurtha: It seems like part of this is an answer, in that you're saying that using "Run in Terminal" is a workaround that gets MATLAB to launch. I recommend editing out anything that isn't an answer. (You might still want to post a new question, in accordance with @FEichinger's suggestion.) Please also make clear whether any changes have to be made before, in order for this workaround to be effective. – Eliah Kagan Feb 10 '13 at 20:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.