MATLAB Answers

Why does MATLAB fail to install with a "'std::runtime_error' what(): Unable to launch the MATLABWindow application" error on Linux?

370 views (last 30 days)

When I try to install MATLAB it fails with the following error:

terminate called after throwing an instance of 'std::runtime_error'
what(): Unable to launch the MATLABWindow application

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 7 Oct 2020
Edited: MathWorks Support Team on 7 Oct 2020
This error message is typically caused by a library dependency error.
To resolve this issue, please remove the following libraries from the MathWorks Installation files, specifically the /bin/glnxa64 directory:


Show 9 older comments

Sign in to comment.

More Answers (4)

Tianjiao Ding
Tianjiao Ding on 3 Aug 2020
In fact this solution seems to work so well that I would like to make it an answer rather than a comment to help those who suffer from this problem. I am using ssh to connect a remote machine, and on the remote machine I am root.
  1. Turn on X11-forwarding to have remote display. This is a must if you do not want to install without GUI (where I tried for 15 mins to look for the so-called "File installation key" and gave up). Then ssh -Y or ssh -X to the remote machine.
  2. Install by directly running "install_unix_legacy". For me it is located at MATLAB2020a/bin/glnxa64/install_unix_legacy, but it may be different for you if you are using different architectures/operating systems.
  3. If 2 does not work, try runing "install_unix".
  4. Now a window for installation should pop up. Cheers!
I did not delete any of the files mentioned by the other answers. If you want to try, remember to delete not only the indicated files, but also their symbolic links in the same directory.


Show 8 older comments
Joshua Detwiler
Joshua Detwiler on 10 Dec 2020
"However, Matlab always crashes several seconds after startup"
I ran into this problem a couple times. It happened whenever I was running Matlab using my desktop entry (through dmenu). Anyway, if I ran Matlab at the command line, I'd get an actual error, telling me that Matlab isn't activated. I'd rerun the activation script in MATLAB/R20xxc/bin/, and all would be well again. This eventually stopped happening when I updated from R2020a to R2020b.
Without knowing what the actual error is, I'm afraid I can't help any more.
Erick Bezerra
Erick Bezerra on 28 Jan 2021
I had the same error, tried almost everything from here, and the right one was the "sudo ./install_unix_legacy"
Matlab R2020a
Ubuntu 20.10

Sign in to comment.

Jeffrey Daniels
Jeffrey Daniels on 10 Dec 2020
Edited: Jeffrey Daniels on 10 Dec 2020
I had this same problem. I didn't need to use 'install_unix_legacy' or remove any libraries. This is how I fixed it:
Ensure that you have permission to read and execute in the folder you are running ./install from, because the installation program needs to stat files in that folder structure; /home/[user]/MatlabR2020b_Linux_Install/bin/glnxa64/cef_locales/ to be specific, among others.
$ chmod 755 -R /home/[user]/MatlabR2020b_Linux_Install/
$ sudo ~/MatlabR2020b_Linux_Install/install


norbert on 26 Dec 2020
Great, thanks! That solved my problem, and the installation of R2020b worked like a charm on Ubuntu 20.04 LTS.

Sign in to comment.

Yu Jiang
Yu Jiang on 5 Nov 2020
I'm also having this problem, on ubuntu 20.10, and removing and did not resolve the problem. I'm still getting the same error
terminate called after throwing an instance of 'std::runtime_error'
what(): Unable to launch the MATLABWindow application
Aborted (core dumped)


Colin Fraser
Colin Fraser on 11 Nov 2020
Using the legacy installer is not a qualified workflow. If you are experiencing any issues installing MATLAB and the steps outlined in the article above do not help, please contact MathWorks Install Support
-Colin Fraser

Sign in to comment.

RASHAD AHMED on 16 Dec 2020
The default installer required some dependencies not found on a vanilla minimal RHEL based distro. Neither the installer nor the legacy installer opened correctly. The default installer successfully ran after installing the following packages:
yum install libX11 libXcomposite libXcursor libXdamage libXext libXfixes libXft libXi libXrandr libXrender libXScrnSaver libXt libXtst libXxf86vm alsa-lib atk cairo cups-libs fontconfig GConf2 gtk2 gdk-pixbuf2 gnome-vfs2 gstreamer1-plugins-base gstreamer1 pango libsndfile libxcb libxslt
These packages were the requirements for MCR, but it helped resolve the installation for default MatLab (R2020b) nonetheless.

  1 Comment

Laura Morris
Laura Morris on 5 Jan 2021
I'm running a fresh install of RHEL 8 and MATLAB R2020b wouldn't install. Error exactly as in the title. I tried removing and (didn't work). I tried the Jeffrey Daniels solution (also didn't work). I tried Rashad Ahmed's package installation, and that's where I found a problem. Everything was already installed EXCEPT "gnome-vfs2", which is "not included" in RHEL 8 according to Red Hat documentation. So then I tried Tianjiao Ding's "install_unix_legacy" method. THAT WORKED! This all started because I was trying to test a stand alone app being created by a coworker (which uses Runtime R2020a). I couldn't get the app to start. But that may be another issue. This only fixed the MATLAB installation issue.

Sign in to comment.


No tags entered yet.

Community Treasure Hunt

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

Start Hunting!