Results 1 to 9 of 9

Thread: Creating symbolic links after installation of Matlab Ubuntu 20.10

  1. #1
    Join Date
    Jan 2021
    Beans
    10

    Creating symbolic links after installation of Matlab Ubuntu 20.10

    Yesterday I installed Matlab yesterday using the process outlined in this video:
    https://www.youtube.com/watch?v=Nfg4KdIwEnM

    After downloading R2020b from the Matlab website from:
    https://www.mathworks.com/downloads/...release=R2020b

    I used the commands:

    cd Download/Matlab
    ls
    unzip <name of the file>
    cd
    sudo ./Downloads/Matlab/install


    I got through the installation process, but I can't find Matlab among my applications. I'm thinking maybe this is because during the installation process I may have forgotten to check the box to create a symbolic link? I'm not sure if that would be the reason. As it stands I don't know how to open the app. I was able to find files in usr/local/MATLAB/R2020b which leads me to believe at the vary least it was partially installed.

    Thank you in advance for any help.

  2. #2
    Join Date
    May 2010
    Beans
    3,247

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    What is the output of:
    Code:
    sudo updatedb
    locate -i matlab*
    Thanks

  3. #3
    Join Date
    Jan 2021
    Beans
    10

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    sudo: updatedb: command not found

    assuming maybe the b at the end of updated was an error:

    sudo: update: command not found

    and after the locate -i matlab* code:

    Command 'locate' not found, but can be installed with:
    sudo apt install mlocate # version 0.26-3ubuntu3, or
    sudo apt install plocate # version 1.0.4-4

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    Is there a "bin" directory under /usr/local/MATLAB/R2020b, or perhaps just a file named "matlab" somewhere around there. If the installer is aware of /usr/local, then there may be an executable in /usr/local/bin.

    Locate is a very useful program to have. Run "sudo apt install mlocate". Then run "sudo updatedb" to build the database of filenames. It will be automatically maintained after that. Now you can type "locate some_string" and get a list of all the files with that string. There are advanced options to use regular expressions and other features. See man locate for details.
    Last edited by SeijiSensei; January 26th, 2021 at 04:58 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Dec 2014
    Beans
    2,586

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    The 'db' at the end of that command was not an error; you simply don't have locate installed and therefore the companion program to update the database for locate isn't installed either. (Which seems strange to me; I always assumed locate was installed by default ... )

    The video you linked to doesn't show the program being started graphically; he starts it from the command line with 'matlab'. In the answer to a comment he explains what the symlink is for: matlab does not change PATH so the program could be called directly, instead it puts a link to the program in a directory that is in $PATH. If you neither change PATH nor create a symlink you can still run the program by entering the full path and the name of the program - something like '/usr/local/MATLAB/R2020b/matlab' or '/usr/local/MATLAB/R2020b/bin/matlab', probably.

    By the way, if you don't use (or need) the various toolboxes for Matlab, there's an Open Source replacement available (GNU Octave); version 5.2 is in the repositories for Ubuntu 20.10 and can be installed with a simple 'sudo apt install octave'. AFAIK the language is mostly the same and there are extensions to Octave to replace many of the more popular toolboxes.

    Holger

  6. #6
    Join Date
    Jan 2021
    Beans
    10

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    There is a bin directory, /usr/local/MATLAB/R2020b/bin. There is a file titled matlab which is opened as a read-only text editor file.

    I ran "sudo apt install mlocate" to install locate, which was done successfully it seemed.

    I ran "sudo updatedb" and the command didn't have any response in the terminal.

    I next ran "locate -i matlab"

    The resulting code is too long for this post.

    When I ran, '/usr/local/MATLAB/R2020b/bin/matlab' I got this licensing error:

    License checkout failed.
    License Manager Error -9
    This error may occur when:
    -The hostid of this computer does not match the hostid in the license file.
    -A Designated Computer installation is in use by another user.
    If no other user is currently running this program, you may need to activate.

    Troubleshoot this issue by visiting:
    https://www.mathworks.com/support/lme/R2020b/9

    Licensing error: -9,57.

    I did previously try to install Matlab on this laptop with windows 10 OS (it's a hand-me-down and I've previously been a mac user), but during install the hard drive failed. I bought a new hard drive and figured it was a good time to make the jump to Linux.

    Thank you for the open source recommendation, I'll probably give that a go in the future. I need Matlab for school so to avoid unforeseen complications I'll stick with that for now.
    Last edited by awildner; January 26th, 2021 at 10:03 PM.

  7. #7
    Join Date
    Jan 2021
    Beans
    10

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    Following the steps provided by the link I the code. I'll update when I've completed them.

  8. #8
    Join Date
    Jan 2021
    Beans
    10

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    Those steps work and I'm able to run the program now. Although looks like some part of it failed:

    Gtk-Message: 15:20:04.084: Failed to load module "canberra-gtk-module"
    Gtk-Message: 01:15:49.418: Failed to load module "canberra-gtk-module"

    Is there a way to create an Icon link among my other apps so i don't have to access through my command line every time?

  9. #9
    Join Date
    Dec 2014
    Beans
    2,586

    Re: Creating symbolic links after installation of Matlab Ubuntu 20.10

    Creating a graphical starter isn't all that complicated. You just need a .desktop file and put it in one of the places (/usr/share/applications for system wide installation, $HOME/.local/share/applications for user specific installation) where these are supposed to go.
    Code:
    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=Matlab
    Comment=Matlab R2020
    Icon=
    Exec=
    Path=
    NoDisplay=false
    Categories=Development;Education;Math
    StartupNotify=true
    Terminal=false
    Copy this into an editor, add values to the lines marked in red (Icon is the path and name of an image file to use as the icon for the program; Exec is the command to run; Path is the directory to run the program in) and save under an arbitrary name ending in .desktop in one of the directories named above.

    You can disregard the message about 'canberra-gtk-module'; canberra is a module for playing sounds in response to (input-) events; looks like Matlab can use that if it's installed, but it isn't.

    Holger
    Last edited by Holger_Gehrke; January 27th, 2021 at 11:29 AM.

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
  •