How do I install on Ubuntu?

I am a novice Ubuntu user, I know how to use Terminal. I am trying to install MATLAB 2020a on my Ubuntu machine, I have downloaded the Linux Installer which is a zip folder. What do I do from here? Thanks!

Réponses (3)

Karim Ghezali
Karim Ghezali le 9 Mai 2020

27 votes

How to install MATLAB R2020a on ubuntu
  • Download the Matlab installer file
  • Unzip the installer file using this command:
unzip -X -K matlab_R2020a_glnxa64.zip -d matlab_2020a_installer
  • Open the matalab_2020a_installer folder and open a terminal
  • use your terminal as root using the following command :
sudo su
  • type your password then :
sudo ./install
Now the MATLAB Installer is on, sign in, follow the steps and choose the product that you need
Nb :
Be sure to run the installer as root that will allow matlab to write in /usr/local/MATLAB/R2020a folder
Using only the sudo command can cause this error message :
$ sudo ./install
No protocol specified
terminate called after throwing an instance of '(anonymous namespace)::DisplayError'
what(): No display available.

26 commentaires

Sudipto Ghosh
Sudipto Ghosh le 3 Sep 2020
Thanks. Really helpful!
Hamza Shaikh
Hamza Shaikh le 7 Sep 2020
Thanks.
Running the
sudo ./install
line returns
sudo: ./install: command not found
How can I remedy this?
Stefan Schwarze
Stefan Schwarze le 15 Sep 2020
if "sudo su" is executed before, only "./install" is sufficient
Raul Foronda
Raul Foronda le 10 Oct 2020
Hello,
I runned the commands and received that the instalation was successfully completed, but didn't find the program on my computer. How can I fix this ?
sudo apt install matlab-support
This helped me alot after my installation
To run Matlab you will not found it on your desktop
Open your terminal :
  • Go to this folder using :
cd /usr/local/MATLAB/R2020a/bin
  • Then open matlab :
./matlab
Floriana Vasile
Floriana Vasile le 3 Nov 2020
if you go on the Ubuntu Software center you will find Matlab. It doesn't install Matlab, but once installed you will finally have your icon to click (there will be few steps to ''configure'' it).
If it doesn't work open the terminal with ctrl + shift + t and then just write matlab. It is very useful, since if matlab doesn't respond you can also just close the terminal to close it!
Md Shahid Ansari
Md Shahid Ansari le 27 Jan 2021
I tried to follow the steps after rooting, sudo ./install shows error " error while loading shared libraries:file too short"
how can I resolve this problem?
Trying to install in ubuntu 16.04 R2020a matlab version.
Just do
sudo su
before unzipping the file
Brian Derstine
Brian Derstine le 17 Mai 2021
For whatever reason, this answer did not work.
I ran sudo su for the unzip command to avoid error messages related to the options -X -K but received the No protocol specified error when attempting to run sudo ./install as root.
If instead, I exit out of sudo and run sudo ./install as my user, the install just works. I believe this has something to do with the root user not being able to launch the installer GUI i.e., No display available.
One additional step might be to create the destination installation directory: sudo mkdir /usr/local/MATLAB/R2021a (or whatever version) prior to running the install.
Sunreeta Bhattacharya
Sunreeta Bhattacharya le 18 Mai 2021
You can create a desktop shortcut icon launcher to open matlab by defining the path to launch. If you installed it to the usr folder the path will look like: /usr/local/MATLAB/R2020a/bin/matlab -desktop
Ahmad Bayhaqi
Ahmad Bayhaqi le 16 Août 2021
I have tried to install matlab R2021a version following this code.
However, I got warning like this :
GLIBC_2.14 is not found.
What should I do then?
Thank you
Ahmad Abuaish
Ahmad Abuaish le 22 Sep 2021
Hi there,
I am installing MATLAB 2021b prerelease. When I am in su, the install program won't run, i.e., the installation gui won't launch and the terminal would halt. However, when login as a user, the install program would run and installation gui would appear, but I get the root permission error. I could choose a different directory. But I think I should stick the defualt directory.
So, how can I get the install program to run in su mode? I even tried sudo ./install when I was in user mode.
Kind regards, and I look forward to hearing from any one.
Yantong Wang
Yantong Wang le 23 Sep 2021
Same problem with Ahmad... by the way, my OS is ubuntu 20.04.
Satheesh S
Satheesh S le 23 Sep 2021
Same problem with Yantong and Ahmad
Shiro Hirano
Shiro Hirano le 26 Sep 2021
Same problem with the above three for LinuxMint 20.2, although I was able to install R2020a and R2021a to /usr/local/MATLAB/.
Fabiano Baroni
Fabiano Baroni le 27 Sep 2021
Same problem here. What is the recommended solution? Running it with gksudo could be a good option?
If installation GUI doesn't launch, it could very well be that MATLAB is not being able to access the X Server. Run:
xhost +SI:localuser:root
sudo ./install
Karnbir Saini
Karnbir Saini le 5 Oct 2021
@Álvaro F. López de Quadros the xhost command solved my issue. Thanks!
Nicholas William Chai
Nicholas William Chai le 12 Oct 2021
@Álvaro F. López de Quadros Yes, the xhost solved the issue.
yogesh nijsure
yogesh nijsure le 11 Nov 2021
@Álvaro F. López de Quadros, xhost command solved my issue.
Hello, I'm a novice user of both Matlab and Linux, but most of my Matlab experience has been on Windows 7, 10. When I try to install on Kubuntu 20.10, I get this error:
..$ sudo ./install
/home/<user-name>/Documents/Matlab/matlab_R2021b_glnxa64/bin/glnxa64/MathWorksProductInstaller: error while loading sh
ared libraries: /home/<user-name>/Documents/Matlab/matlab_R2021b_glnxa64/bin/glnxa64/libicudata.so.67: file too short
JOONSOO YOO
JOONSOO YOO le 24 Mai 2022
@Álvaro F. López de Quadros Thanks, it solved my issue as well
Sébastien MAILFERT
Sébastien MAILFERT le 4 Juil 2022
@Álvaro F. López de Quadros Thank you!!!!!!!!
MAMATHA YADAVALLI
MAMATHA YADAVALLI le 28 Déc 2022
While installaing matlab in ubunru i am geeting below error.Please help me to install.

Connectez-vous pour commenter.

William Rolen
William Rolen le 26 Oct 2020

7 votes

You dont actually have to install it to root. You can just install to your home directory. I would actually prefer this way, particularly if you work on a cluster.

4 commentaires

Mahmod Karndash
Mahmod Karndash le 22 Juin 2022
I have ubuntu18.04 in wsl2 how install matlab r2018a step by step please help
I tried but I do not Succeed
root@DESKTOP-SMROJT0:~/softwares/R2018a# sudo ./install
Preparing installation files ...
Installing ...
Finished
root@DESKTOP-SMROJT0:~/softwares/R2018a# xhost +SI:localuser:root
localuser:root being added to access control list
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0xe
Serial number of failed request: 7
Current serial number in output stream: 9
root@DESKTOP-SMROJT0:~/softwares/R2018a# sudo ./install
Preparing installation files ...
Installing ...
Finished
root@DESKTOP-SMROJT0:~/softwares/R2018a#
Mahmod Karndash
Mahmod Karndash le 22 Juin 2022
root@DESKTOP-SMROJT0:~/softwares/R2018a# sudo ./install
Preparing installation files ...
Installing ...
Finished
the installer does not launch and MATLAB is not installed.
please help
Mohamed Kbaier
Mohamed Kbaier le 19 Mai 2024
sudo ./install it works. 00EKm:~/Téléchargements/matlab_R2024a_Linux$ sudo ./install
Laxmi
Laxmi le 11 Août 2024
After installation, how to load the matlab which is installed in ubuntu 20.04.

Connectez-vous pour commenter.

Samuel Gray
Samuel Gray le 25 Mai 2021

0 votes

The basic problem is that "Linux Matlab" was initially only compatible with RedHat based Linux and has gained compatibility with Debian-based Ubuntu over time.
https://www.mathworks.com/support/requirements/matlab-system-requirements.html
To install the older RH based Matlab on Ubuntu you have to go into the distribution tree and run an "alternate" installer. Look at the readme files which will show how to do this. Look for the section that has to do with the GUI failing to launch.
The later versions are compatible with Ubuntu and as such an upgraded version should not have this problem. So now you just have to worry about what version of Linux to run as there are definite advantages to each.

Catégories

Produits

Version

R2020a

Commenté :

le 11 Août 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by