Articles/Procedure to install Matlab from CSC Repository

From LUG@IITD

Jump to: navigation, search

Contents

Installation

Before installing matlab ensure that you are having java1.6 jre installed. (Debian users can get it from backports.org). To install csc's matlab on your linux machine follow the following steps:-

mkdir matlab-temp
cd matlab-temp
wget ftp://10.12.2.254/current_matlab_2008a/matlab.tar (or wget http://10.10.4.1/pub/Linux/software/current_matlab_2008a/matlab.tar)
wget ftp://10.12.2.254/current_matlab_2008a/license.dat (or wget http://10.10.4.1/pub/Linux/software/current_matlab_2008a/license.dat)
tar -xvvf matlab.tar
cd matlab
su
mkdir /etc/matlab -p
mkdir /etc/matlab/etc -p
cp ../license.dat /etc/matlab/etc/
/bin/bash ./install

Just say ok.

Matlab is now installed. You can run it by running in console

/etc/matlab/bin/matlab

This completes the installation. Please note that you must be connected to LAN to use this software

since it looks for some files on server for licence.

Please note that occassionally the licence file on server changes. If that happens replace your license.data with the newer one on the above location.

If somebody has a problem you can report it to the group.

Uninstallation

Just remove the installation directory and all of its content. like:

su
rm -rf /etc/matlab/*
rmdir /etc/matlab

Problems

xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed

My matlab is not starting and showing this error xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock' failed

I cannot see the toolbar/menubar in matlab

Just add this line in ~/.bashrc or .profile file export AWT_TOOLKIT=MToolkit

License Error

License checkout failed.
License Manager Error -96
MATLAB is unable to connect to the license server. 
Make sure that the MATLAB client machine can communicate with the hostname listed 
in  the SERVER line
of the license file, and that the port listed in the SERVER line is not blocked by a 
firewall.
Troubleshoot this issue by visiting: 
http://www.mathworks.com/support/lme/R2008a/96 
Diagnostic Information: 
Feature: MATLAB 
License path: /root/.matlab/R2008a_licenses:/etc/matlab/licenses/license.dat: 
/etc/matlab/licenses/network.lic: 
FLEXnet Licensing error: -96,7. System Error: 2

solution

open file /etc/matlab/licenses/network.lic as super user In the SERVER line replace sunfire0 with 10.10.4.1 If even now it doesn't work then the license server 10.10.4.1 is down. Or from your network you are unable to reach 10.10.4.1 in that case contact Mr. Ram Lal in CSC. (To cheak If it's really down or unreachable try ssh 10.10.4.1 and see if u can connect to 10.10.4.1) Remember every time you try to run matlab you must be connected to LAN, because it verifies license every time.

Trick

Matlab icon in system menu

[Desktop Entry]
Name=Matlab
GenericName=User Interface Designer
Exec=/etc/matlab/bin/matlab
Terminal=true
StartupNotify=true
Type=Application
Icon=/etc/matlab/toolbox/matlab/demos/html/logo.png
Categories=GNOME;GTK;Development;GUIDesigner;
X-Desktop-File-Install-Version=0.13
Personal tools
Namespaces
Variants
Actions
LUG@IITD
Toolbox