I recently installed Ubuntu 12.10 in my system and found that the upgrade a lot of my system. A reasonable number of fixes were simple but some of them were very annoying. In this post I just wanted to discuss two specific errors I faced and how to fix them.
I use the student version of Matlab (32 bit) on a 64 bit machine. As part of upgrade to Ubuntu 12.10 , the installer removed multiple 32 bit files which caused the issue. When I tried to run Matlab , I got the following errors :
~/matlab/bin/matlab: 1: ~/matlab/bin/util/oscheck.sh: /lib/libc.so.6: not found
~/matlab/bin/glnx86/MATLAB: error while loading shared libraries: libXpm.so.4: cannot open shared object file: No such file or directory
The first error is mostly harmless – I will describe how to fix it later in the blog post. Fixing the first error needed to install 386 (32bit) version of few packages. Of course, fixing one exposed the next error and so on. In the interest of time, I will put all the packages in the single command.
sudo apt-get install libxpm4:i386 libxmu6:i386 libxp6:i386
Running the above command worked and allowed Matlab to run. However, I then faced another issue – when I tried to save a plot, it was failing again with the following error : (fixing first caused the second)
MATLAB:dispatcher:loadLibrary Can’t load ‘~/matlab/bin/glnx86/libmwdastudio.so’: libXfixes.so.3: cannot open shared object file: No such file or directory.
??? Error while evaluating uipushtool ClickedCallbackMATLAB:dispatcher:loadLibrary Can’t load ‘~/matlab/bin/glnx86/libmwdastudio.so’: libGLU.so.1: cannot open shared object file: No such file or directory.
??? Error while evaluating uipushtool ClickedCallback
To fix this, run the following command :
sudo apt-get install libxfixes3:i386 libglu1-mesa:i386
Finally, to fix the innocuous error :
~matlab/bin/matlab: 1: /home/neo/gLingua/matlab/bin/util/oscheck.sh: /lib/libc.so.6: not found
do the following :
sudo ln -s /lib/x86_64-linux-gnu/libc-2.15.so /lib/libc.so.6
Of course, make sure the libc-2.xx.so version is the correct one before running this command.
Hope this post helped !