Hi,
Here is an attempt to give you some tips to install and run matlab on breezy running on 32bit.
Note: This is for original licensed full version which requires a license file to start and run Matlab. Installing Matlab is not 'sooo' complicated if you follow the instructions from mathworks.
Then what is this HOWTO for? Well, there is a very high probability that one will run into various problems (like me!!!). SO this HOWTO explains dealing with some specific problems like the ones I ran into while installing it in Breezy.
I acknowledge the howto by hangfire and people posted in that thread. You may find my comments there too. Thanks to n0ah420 for helping me to nail this thing down. Please consider this as a supplement to the above howto
I. Install matlab. Follow these instructions from mathworks.
* Be sure to check the license file for carriage returns. See that all lines are separated as explained in the instruction procedure. If there is some problem perfectly reading the license.dat file then quit the installation and restart.
* Do not skip the 'create link' option. be sure to check the box before proceeding.
II. Post installation-several problems I ran into, during the post installation phase.
1. Installation was OK. but I couldn't start matlab. There was simply no matlab command ! No link was made in /usr/local/bin.
2. No lmstart script file or matlab executable in $matlab/etc. So nothing was working with just the matlab folder sitting there doing nothing...!
So re-did the whole installation after emptying the matlab folder in /usr/local. This time it was successful. The problem was with the license.dat file. Careful when you copy-paste to an editor. There were no proper separation between the lines...as given below (sample from mathworks modified to reflect the problem I had...)
Note: Here $matlab refers to the matlab home directory. In my case it was \usr\local\matlab71
Open up and edit license.dat file in /etc .. not the one we copied initially..
If it is like this....Code:sudo gedit $matlab/etc/license.dat
see how the 'INCREMENT' follows SN = 12345 in the same line# BEGIN-------cut here-------CUT HERE-------BEGIN
# MATLAB license passcode file.
# LicenseNo: 12345 HostID: ID=12345
INCREMENT TMW_Archive MLM 15 01-mar-2006 0 BC9GDE7743A77D15A1F8 \
VENDOR_STRING=83 HOSTID=DEMO SN=12345 INCREMENT MATLAB MLM 15 01-mar-2006 1 4C9DB3348561DBE97E3B \
USER_BASED DUP_GROUP=U SN=12345 INCREMENT SIMULINK MLM 15 01-mar-2006 1 1CD71484665EF583DF8B \
USER_BASED DUP_GROUP=U SN=12345
then change it to....
Use 'enter' btw. This time a proper link was created and matlab was launching from the terminal.# BEGIN-------cut here-------CUT HERE-------BEGIN
# MATLAB license passcode file.
# LicenseNo: 12345 HostID: ID=12345
INCREMENT TMW_Archive MLM 15 01-mar-2006 0 BC9GDE7743A77D15A1F8 \
VENDOR_STRING=83 HOSTID=DEMO SN=12345
INCREMENT MATLAB MLM 15 01-mar-2006 1 4C9DB3348561DBE97E3B \
USER_BASED DUP_GROUP=U SN=12345
If not, and getting some license file error then check
$matlab\etc and see if you have the lmstart, lmstat, lmboot etc. are present. If not look for them at
If you find them then copy all the 'script files' into $matlab/etc folder.Code:$matlab/etc/scripts
for e.g.,
[Now you will be able to start matlab without any problems. Solutions when encountered with lib permission issues could be solved byCode:sudo cp $matlab/etc/scripts/lmstart $matlab/etc
issuing proper chmod commands. (I used chmod 755). Missing gcc lib files could easily be obtained from synaptic.]
3. Then there were other problems. No command could be executed. Could not even change the directory location. No file could be opened. No commands like plot etc could be used. Was experiencing "segmentation violation error". All this pain and what I have now is a simple calculator!
Then n0ah420 pointed this out. (also provided in mathworks helpdesk somewhere)
execute in matlab window:
4. Now - no rehash command found, savepath was not working, matlabrc not found. What the ....!!!Code:>> restoredefaultpath; matlabrc >> savepath >> rehash toolboxcache
Reason?
matlabrc.m and pathdef.m were not in $matlab/toolbox/local. Here is what the installation guide and so does matlab expected them to be found.
4 Actually they were in
Surprising. I dont know why it was like this. May be some incombatibility with breezy? No idea.Code:$matlab/toolbox/local/template
So the solution was to copy all those files to the place where matlab searches, which is
5. Again, there was nothing in pathdef.m file. Matlab would expect to get some paths using which it can load all the necessary stuff at launch. "restoredefaultpath" writes the necessary paths to this file. Since I was getting permission denied error when running that command, login as root using 'su' and start matlab and issue these commands in matlab,Code:$matlab/toolbox/local
6. Exit and relogin as normal user and lauch matlab.Code:>> restoredefaultpath ; matlabrc >> savepath
Note[edited content from mathworks somewhere]: Warnings related to toolbox cache happens when a new verison is installed and at its first launch. Data from this launch will be saved automatically for future sessions until a new version is installed.
OR use the matlab command
along with step 5.Code:>> rehash toolboxcache
7. Restart matlab and bingo !!! it should be working, with no segmentation violation error, no permission denied error, no lib files missing, no problem with license stuff, no matlabrc not found etc...
To launch matlab without an associated command window...
[credit: n0ah420] create a launcher with the command...
Moral of the story : Locate all the needed files and put them in the place where matlab searches them.Code:$matlab/bin/matlab -desktop &
Thanks and good luck people. Please let me know how it went for you and feel free to discuss.
Bookmarks