Why do I see "Preparing installation files ... Installing ... Finished..." in the terminal window when running the Installer on Linux, but MATLAB is not installed?

521 views (last 30 days)
When running the Installer on Linux, I see the below in terminal:
Preparing installation files ...
Installing ...
However, the installer does not launch and MATLAB is not installed.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Mar 2021
Edited: MathWorks Support Team on 10 Mar 2021
This issue can be due to several different issues. The most common causes are:
  1. One or more of the binaries required for installation inside the MATLAB installation folder does not have execute permissions
  2. Launching the installer without an X11 display configured
  3. The user that is launching the installer is not able to display windows on this X11 display
  4. Libraries required for the MATLAB installer are missing
Issue #1: One or more of the binaries required for installation inside the MATLAB installation folder does not have execute permissions
To resolve this issue, grant execute permission to the entire MATLAB installer folder by running this command from the folder which contains the installer folder:
sudo chmod -R 777 matlab_R20XXx_glnxa64
​You must be part of the sudoers/wheel group to run this command and will be prompted for your password. We do not recommend installing as root.
Issue #2: Launching the installer without an X11 display configured
Launching the MATLAB installer on a machine without an X11 display will fail unless you configure the installer to run silently. To install MATLAB without an X11 display, see the below related article:
How do I use the Silent Installer for MATLAB?
Issue #3: The user that is launching the installer is not able to display windows on this X11 display
This issue often occurs when launching the installer as root. See the below for more information:
Issue #4: Libraries required for the MATLAB installer are missing
MATLAB is fully supported on Desktop installation of Linux. It is not supported on minimal distributions. A minimal installation may not contain all libraries that MATLAB requires.
Even if you intend to run MATLAB only in non-graphical mode, MATLAB requires some X11 libraries to run. Unfortunately, we are not able to specify the X11 requirements down to the exact set of packages required because different distributions may package the libraries differently. MATLAB will work out of the box on desktop installations of any supported distribution.
See the below for a list of qualified distributions:
Wenzhe Liu
Wenzhe Liu on 20 Mar 2019
I tried the #1.
however, when I run the commend in it turns out message of many lines, like
"chmod: changing permissions of 'install': Read-only file system".
And the install problem stayed when I tried to install after this operation.
Any suggestion about how can I solve this install problem please?
Further Information :
During my trial in install, when I mount the .iso file, it comes out "mount: /dev/loop0 is write-protected, mounting read-only";
Then I tried to install, it came out lines of error message like
'' cp: error reading '/home/nopanic/matlab/bin/glnxa64/libstdc++.so.6.0.17': Input/output error"
and folowed by
"Installing ...
OS: Ubuntu 16.04.1
Thanks! Sorry for the disturb.

Sign in to comment.

More Answers (10)

Lingyu YUE
Lingyu YUE on 2 Jul 2019
You can try type:
xhost +SI:localuser:root
before sudo ./install
Mario Nicola
Mario Nicola on 17 Nov 2021
I experienced a problem sligtly different from the one in the original post (on Ubuntu 20.04): in my case the install program did not terminate but it remained blocked without doing anything (I had to kill it because Ctrl-C was not working).
Nevertheless, this solution worked fine and then I was able to complete the installation. Thx!

Sign in to comment.

Nick Warren
Nick Warren on 13 Jul 2017
I had the same issue when installing on a remote server. The splash screen would briefly appear, and then abruptly be 'finished'.
Turns out there was some missing packages required for X11, even though the splash screen was displayed remotely (however briefly). I resolved this by installing xterm, which caused the missing packages to be installed also:
$ sudo apt-get install xterm
$ xterm
If xterm produces an X window ok, then the matlab installer should now work.

Emiliano Heyns
Emiliano Heyns on 23 Apr 2018
It's pretty curious that the recommendation is not to install as root, but that the default path to install to is /usr/local/MATLAB/R2018a ... which is only writable by root by default. Meanwhile, running with gksu or sudo doesn't do anything for me. The gksu window just sits there but input goes to the console, not gksu.
Can someone just put together a PPA for this? Install & upgrade of matlab on linux is a really miserable experience.
  1 Comment
James Hill
James Hill on 6 Jun 2018
My experience is opposite. I would recommend installing as root. I do not think it is terrible at all. If you use a rolling release or a snapshot release Linux these are going to be part of your MATLAB/LINUX life cycle. I am in the same boat.
I went on a rant in this space...and deleted it.
Please log on as root (Pop!_OS does not give you a root); MATLAB has mostly worked out of the box for me. I am slowing working through all the openSUSE Tumbleweed and MATLAB disagreements...

Sign in to comment.

John Miezitis
John Miezitis on 24 Jul 2018
In my case I am installing into an HPC environment on Centos 7.5 where you do not want to use desktop environments. I had a basic X11 environment including xterm installed but the installer would not run until package libXtst was installed.
Accpeting the Math Works Team comment that they cannot provide a list of packages for every distribution I believe they could make the process of determining which libraries are missing easier.
I had to find which command was actually being run by running the install scripts with sh -x. I say scripts plural because the first script merely copies some install files to /tmp you then need to sh -x the next script in the chain until you find the executable that redirects output to /dev/null run that without the redirection and you can discover the missing library.
Perhaps the output could be redirected to a log file instead of /dev/null.

Sign in to comment.

Bruno jeanneret
Bruno jeanneret on 20 Mar 2018
Curiously the link for the issue #2 references a windows installation ...
On the same linux machine (Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux), the installer of the release 2016a works fine, but the 2017b release won't !
Has anyone tried the 2018a installer ?
Thanks in advance,
Arthur Kenton
Arthur Kenton on 25 Mar 2018
2018a installer worked fine..
but Matlab won't start...
crash dump file..
Ubuntu 16.04
Segmentation violation detected at Sun Mar 25 14:46:43 2018 -0500
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
GNU C Library : 2.23 stable
MATLAB Architecture : glnxa64
MATLAB Root : /usr/local/MATLAB/R2018a
MATLAB Version : (R2018a)
Operating System : Ubuntu 16.04.4 LTS
Process ID : 28692
Processor ID : x86 Family 31 Model 2 Stepping 2, AuthenticAMD
Session Key : b6ed3445-80e2-4e1e-bcaf-cb48f29dc012
Static TLS mitigation : Disabled: Cannot load X11
Fault Count: 1
... any help appreciated... the DISPLAY fix noted didn't seem to work work..

Sign in to comment.

Srinath Gunnery
Srinath Gunnery on 29 Mar 2018
I had issue_3,solved by typing
printenv | grep DISPLAY, export DISPLAY=:<display value that u received from previous command> xhost + localhost
After installation type
xhost -
Finally it is done.

Jeff Mandel
Jeff Mandel on 10 Sep 2018
I just spent the day installing Ubuntu 18.04 server on Virtual Box, and then Matlab 2018a on that. I had the same experience as the OP until I installed libxtst6 via apt-get, then everything proceeded smoothly. I suspect that it I had done this on Ubuntu Desktop, the library would have been there. Rather than ranting about what libraries MathWorks should include in the linux distribution, I think having someone spending a day building a better install script that could prompt for the username and password for your account and ask for the path to the license file would make my life easier.

Kendall Barboza
Kendall Barboza on 16 Aug 2019
I got:
install: opción inválida -- 'i'
Pruebe 'install --help' para más información.
after doing what is indicated in the installer_input file. Is there another option for try?

Fernando Perez
Fernando Perez on 1 Oct 2019
Heeelp, I have the same problem but nothing works, however I'm trying to install matlab 2019 on kubuntu 18.


No tags entered yet.


Community Treasure Hunt

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

Start Hunting!