Ask Your Question
0

How do I install matlab on fedora?

asked 2018-03-11 05:47:33 -0500

smurfendrek123 gravatar image

When trying to run sudo ./install in the unzipped matlab folder to install matlab on fedora, it immediately says installation finished without actually doing anything. Running the install without sudo doesn't allow me to install matlab to my preferred location.

This used to work on fedora 24. I'm currently on fedora 27.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-03-11 06:14:34 -0500

smurfendrek123 gravatar image

This is because wayland does not allow graphical applications to run as root (so no sudo). Fedora switched to wayland by default with fedora 25.

Easy workaround: You can install matlab on fedora 25 and newer by using xorg instead of wayland to install matlab, running matlab still works in wayland.

So you'll have to log out, and switch to Xorg to install matlab (with sudo ./install), and then you can switch back to wayland.

For installing matlab without going to Xorg: You used to be able to use the normal installer in silent mode (no gui), however, with newer versions of matlab (since r2017a/b) you need the .iso file which can only be obtained by your licence administrator to install matlab in silent mode.

Now the solution is to run the installer as a normal user, by just running ./install (no sudo), and then installing to a folder that user can access and moving that folder to the desired location.

The installation can be done as follows (example uses r2017b, but just change it to your version):

  • Make a directory you can access, for example: mkdir ~/Downloads/R2017b

  • Run the install script as a normal user by running ./install in the matlabR2017bglnxa64 directory you downloaded from the MathWorks website.

  • When prompted for an install location in the gui installer, select the directory we previously made in Downloads.

  • Make a directory where you desire the Matlab installation to end up: sudo mkdir /usr/local/MATLAB (sudo because we can't write to /usr/local/ as a regular user)

  • Now move both the directory R2017b and the MathWorks directory created during installation to the MATLAB folder: sudo mv ~/Downloads/R2017b ~/Downloads/MathWorks /usr/local/MATLAB

  • Finally, to be able to run matlab by just typing matlab in the command line: sudo ln -s /usr/local/MATLAB/R2017b/bin/matlab /usr/local/bin/matlab. This makes a "link" in the /usr/local/bin folder to the matlab executable file, so that your operating system can find it when you try to run matlab.

This was tested on fedora 27, but should work on both older and newer versions of fedora.

edit flag offensive delete link more

Comments

I believe I installed it a few months ago using a similar method and it works. I think I managed to install it at the default location though. I think I just selected XORG at the login screen and it worked but again, that was months ago... Also, I encountered some issues with Java when i tried to generate figures which were solved by installing the GPU drivers.

nasos117 gravatar imagenasos117 ( 2018-03-11 06:41:49 -0500 )edit

Those java issues can also be worked around by running matlab with: "matlab -softwareopengl"

Also if you encounter a segfault issue in r2018a: this link is quite helpfull: https://www.mathworks.com/matlabcentr...

smurfendrek123 gravatar imagesmurfendrek123 ( 2018-04-22 05:33:26 -0500 )edit
0

answered 2018-03-11 06:04:18 -0500

Period22 gravatar image
edit flag offensive delete link more

Comments

This does not work anymore, since newer matlab versions require the .iso file only provided to licence administrators for a silent install.

smurfendrek123 gravatar imagesmurfendrek123 ( 2018-03-11 06:15:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-03-11 05:47:33 -0500

Seen: 250 times

Last updated: Mar 11