Results 1 to 8 of 8

Thread: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

  1. #1
    Join Date
    Nov 2005
    Location
    127.0.0.1
    Beans
    354
    Distro
    Ubuntu Development Release

    HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    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..

    Code:
    sudo gedit $matlab/etc/license.dat
    If it is like this....
    # 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
    see how the 'INCREMENT' follows SN = 12345 in the same line

    then change it to....
    # 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
    Use 'enter' btw. This time a proper link was created and matlab was launching from the terminal.

    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

    Code:
    $matlab/etc/scripts
    If you find them then copy all the 'script files' into $matlab/etc folder.
    for e.g.,
    Code:
    sudo cp $matlab/etc/scripts/lmstart $matlab/etc
    [Now you will be able to start matlab without any problems. Solutions when encountered with lib permission issues could be solved by
    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:
    Code:
    >> restoredefaultpath; matlabrc
    >> savepath
    >> rehash toolboxcache
    4. Now - no rehash command found, savepath was not working, matlabrc not found. What the ....!!!

    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
    Code:
    $matlab/toolbox/local/template
    Surprising. I dont know why it was like this. May be some incombatibility with breezy? No idea.

    So the solution was to copy all those files to the place where matlab searches, which is
    Code:
    $matlab/toolbox/local
    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:
    >> restoredefaultpath ; matlabrc
    >> savepath
    6. Exit and relogin as normal user and lauch matlab.

    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

    Code:
    >> rehash toolboxcache
    along with step 5.

    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...

    Code:
    $matlab/bin/matlab -desktop &
    Moral of the story : Locate all the needed files and put them in the place where matlab searches them.

    Thanks and good luck people. Please let me know how it went for you and feel free to discuss.
    Last edited by neoflight; March 15th, 2006 at 02:16 AM.

  2. #2
    Join Date
    Mar 2006
    Beans
    2

    Re: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    Thanks for the launcher tip -- couldn't figure out why it wasn't working.

    I have the Student version of R14SP3... there's no license file, but each installation must be activated online. This requires some extra tweaks to the online activation script to get it running (found these in another thread here).

    Note also that it appears that the "computer ID" given to mathworks when you activate is tied to the machine... so in my dual-boot, I have it installed in both XP and Linux, and this counts as one installation as far as the activation is concerned (you only get two installations in their student license)...

  3. #3
    Join Date
    Jun 2006
    Beans
    5

    Re: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    Hi,

    I'm in the process of installing MATLAB 7 on my System (Ubuntu 6.06). I was able to install it following the instructions and i was able to start MATLAB after executing install_matlab from the $MATLAB/ directory. Unfortunately my MATLAB seems to be a "simple calculator" as neoflight described it.
    Unfortunately is the above described solution not working on my system, since the files matlabrc.m and pathdef.m are in the right place. Just to be sure I renamed them and used the files from $MATLAB/toolbox/local/template. However, still no difference. When I start MATLAB I get the following error message on startup:
    Code:
                                  < M A T L A B >
                      Copyright 1984-2004 The MathWorks, Inc.
                             Version 7.0.0.19901 (R14)
                                    May 06, 2004
    
    Warning: MATLAB Toolbox Path Cache is out of date and is not being used.
    Type 'help toolbox_path_cache' for more info.
    Warning: MATLAB did not appear to successfully set the search path. To avoid this
    warning the next time you start MATLAB, use
    http://www.mathworks.com/access/helpdesk/help/techdoc/ref/pathdef.shtml
    to help troubleshoot the "pathdef.m" file. To recover for this session
    of MATLAB, type "restoredefaultpath;matlabrc".
    Warning: Duplicate directory name: /home/sebastian/matlab.
    ??? Undefined function or variable "cname".
    
    Error in ==> matlabrc at 82
    if strncmp(cname,'GLNX',4)
    
    Error parsing dbstack: value is:
    ??? Undefined command/function 'dbstack'.
    
    
    >>
    when i type >> restoredefaultpath I get:
    Code:
    Warning: Duplicate directory name: /usr/local/matlab7/toolbox/stateflow/stateflow.
    > In restoredefaultpath at 50
    Warning: Duplicate directory name: /usr/local/matlab7/toolbox/rtw/rtw.
    > In restoredefaultpath at 50
    Warning: Duplicate directory name: /usr/local/matlab7.
    > In restoredefaultpath at 50
    Warning: Duplicate directory name: /usr/local/matlab7.
    > In restoredefaultpath at 50
    Warning: Duplicate directory name: /usr/local/matlab7.
    > In restoredefaultpath at 50
    Warning: Duplicate directory name: /usr/local/matlab7/toolbox/shared/optimlib.
    > In restoredefaultpath at 50
    Warning: Duplicate directory name: /usr/local/matlab7/toolbox/shared/optimlib.
    > In restoredefaultpath at 50
    Warning: Duplicate directory name: /usr/local/matlab7/toolbox/shared/optimlib.
    > In restoredefaultpath at 50
    >>
    and for any further command I will receive something similar to this:
    Code:
    ??? Undefined function or variable 'matlabrc'.
    Did anyone experience that and was able to solve this problem?

    Thank you.

  4. #4
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    I had trouble using Simulink in Matlab 7.1. It gave an error about missing libXft.so.1, but I was able to fix it by installing the depracated libXft1 package from the repository. Just in case anyone else runs into this as well.
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

  5. #5
    Join Date
    Nov 2006
    Beans
    Hidden!

    Re: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    I have exactly same error with S!ian !!! (I have Ubuntu 6.06 and matlab 7,too)
    Last edited by ozancihangir; November 11th, 2006 at 08:11 PM.

  6. #6
    Join Date
    Nov 2005
    Location
    127.0.0.1
    Beans
    354
    Distro
    Ubuntu Development Release

    Re: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    what i observed after these days was the problem lies in mounting the cdrom. there are some files in it which need to have some executing permissions...

    so when you insert the disc and the system mounts the cdrom automatically then umount it and mount it using

    Code:
    mount -t iso9660 CD-device /cdrom
    then the installation is straight forward and all the files (including matlabrc) are installed in their proper locations...

    all you have to be careful is to get the license file correct. it needs carriage returns and breaks at the proper places....

    hope this helps...

  7. #7
    Join Date
    Nov 2007
    Location
    Sydney
    Beans
    6
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    Hi daou,

    Where did you get 'libXft.so.1' from? I can't find it in any of the repositories.

    Thanks

  8. #8
    Join Date
    Jun 2006
    Location
    Finland
    Beans
    796
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: HOWto: Matlab 7.1 R14-SP3 in Ubuntu 5.10-32 bit

    Quote Originally Posted by michaelsharman View Post
    Hi daou,

    Where did you get 'libXft.so.1' from? I can't find it in any of the repositories.

    Thanks
    I think I was running Dapper at the time. It is still available in the Feisty repository. You can try to get it on Gutsy with "sudo apt-get install libxft1"

    If it doesn't work, do a search for libxft and look for a deprecated v. 1 of the library: "apt-cache search libxft"
    echo -e "\x6f\x61\x73\x61\x6c\x6f\x6e\x65\x6e\x40\x67 \b\x6d\x61\x69\x6c\x2e\x63\x6f\x6d"
    It compiles! Ship it!

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
  •