Why is MATLAB unable to run the MATLABWindow application on Linux?

841 views (last 30 days)
Why is MATLAB unable to run the MATLABWindow application on Linux, with the following warning?
>> simulink
Warning: MATLABWindow application failed to launch. Unable to launch the MATLABWindow application

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 8 Mar 2023 at 5:00
Edited: MathWorks Support Team on 8 Mar 2023 at 14:57
There are a few things that can cause MATLABWindow to not open correctly.
1. Missing Libraries
Under normal conditions, supported Linux distributions should have all the libraries needed in the Operating System to run MATLAB and the installer. However, for a variety of reasons, some may be missing on your computer. To ensure that you have the correct libraries installed with your supported Linux distribution, navigate into the folder the installer is in, then the "bin" folder, and then the "glnxa64" folder. In this folder, there is an application called MATLABWindow. If you launch this program with ./MATLABWindow and you are missing libraries, you will see those missing libraries appear in the error message. Use your Linux distribution's package manager to install the missing libraries (such as apt, dnf, yum, or pacman.) If you are unsure what packages include the library you are missing, use your distribution's package search to find a package that contains the library you are missing. For example, if you are missing "libgtk-x11-2.0.so.0" on Ubuntu, use Ubuntu's package search site to search for the appropriate package, and then install it with "sudo apt install libgtk2.0-0". There is not a comprehensive list of every library MATLAB needs in order to function on Linux.
2. Permissions
Make sure the user running MATLAB has permissions to access and execute folders and files from MATLAB's installation directory.
  30 Comments
Drew Parsons
Drew Parsons on 8 Mar 2023 at 15:40
Edited: Drew Parsons on 8 Mar 2023 at 15:41
The R2022b installer fails to start for me too (using debian unstable).
$ ./install
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to launch web window with error: Unable to launch the MATLABWindow application. The exit code was: 127
Aborted
The Matlab binaries seem to be using libraries incorrectly. e.g.
$ bin/glnxa64/MATLABWindow
bin/glnxa64/MATLABWindow: symbol lookup error: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Transform
FT_Get_Transform is defined in libfreetype.so.6, perhaps MATLABWindow needs to be built with -lfreetype ?

Sign in to comment.

More Answers (9)

József Mózer
József Mózer on 8 Jan 2021
I had an error that was not documented on support pages at all, but was very similar to this one. It propped up after I solved issue number 2 in this thread when attempting to launch Simulink.
This solution worked for me on R2019b, but since the issue is consistent it should work with all recent MATLAB releases as well as all Linux distributions. As it turns out, there has been a problem with the Add-on Manager of MATLAB for a while now, causing these issues. Here's the solution in case you don't want to read the details. Also it is uncessary to redirect the symlinks as described on the Wiki, it is enough to exclude them from the matlabroot folder so MATLAB will use system-defaults.
Here's the process, run commands as root when prompted:
cd /usr/local/MATLAB/R2019b/cefclient/sys/so/glnxa64 # default location for this
mkdir exclude
Now enter the commands to remove the symlinks causing the errors.
mv libgio-2.0.so* exclude
mv libglib-2.0.so* exclude
mv libgmodule-2.0.so* exclude
mv libgobject-2.0.so* exclude
mv libgthread-2.0.so* exclude
Your problem should be solved. This shouldn't break anything either, since more up-to-date system defaults exist for these libs. You should also make a README file, so you know what you did and why in case you need to come back a year later or something.
I would also like to state, that I am severely disappointed in MATLAB and Mathworks. Providing a .zip file for installation on systems with very well made package management is dumb and annoying. Shipping an expensive piece of commercial software on an operating system claiming it works, while it needs workarounds is straight up outrageous.
  10 Comments
Michele Ceresoli
Michele Ceresoli on 3 Feb 2023
This worked for me aswell. The problem was:
bin/glnxa64/MATLABWindow: symbol lookup error: /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0: undefined symbol: g_task_set_name

Sign in to comment.


Ion Lazar
Ion Lazar on 23 Apr 2018
This worked for me, thank you.

Júlio César Chaves
Júlio César Chaves on 20 Jun 2020
Install a java virtual machine.
sudo install dnf
sudo dnf install java-1.8.0-openjdk ant -y
  2 Comments
FEDERICO
FEDERICO on 15 Nov 2022
On ArchLinux installing jdk8-openjdk and ant solved most of my issues. I also restored the libraries I had excluded, it seems to work.

Sign in to comment.


Jeff Mandel
Jeff Mandel on 10 Oct 2020
The problem is that MATLABWindow uses the Chromium browser. If you are trying to use this on a headless server (in my case Ubuntu Server 18.04), none of the libraries have been installed. The simple solution is to install Chromium:
sudo apt-get install chromium-browser
I can now install things like MATLAB-Drive on my server through my X-server.
  1 Comment
phoe
phoe on 25 Nov 2022
apt-get install chromium-browser,Is the command running on the server side?

Sign in to comment.


Alex
Alex on 8 Mar 2018
I am facing a similar problem, but with a different library.
This is my error code when I am trying to start SIMULINK:
Warning: MATLABWindow application failed to launch. Unable to launch the MATLABWindow application
> In sltemplate.ui.StartPage/showWithFallback
In sltemplate.ui.StartPage.show
and after running:
>> cd(matlabroot)
>> ! bin/glnxa64/MATLABWindow
i get:
bin/glnxa64/MATLABWindow: symbol lookup error: /usr/lib/libharfbuzz.so.0: undefined symbol: FT_Done_MM_Var
Thank you in advance!
  2 Comments

Sign in to comment.


Hariprasad
Hariprasad on 11 Apr 2018
I tried
>> ! bin/glnxa64/MATLABWindow
and I got error
-bash: bin/glnxa64/MATLABWindow: No such file or directory
What is wrong here? I'm running Matlab R2018a on Centos 6.9 on EC2 instance

Tech Support
Tech Support on 13 Apr 2018
Edited: MathWorks Support Team on 1 Feb 2021
Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin
  1 Comment
Rogier Delporte
Rogier Delporte on 13 Mar 2019
I'm still experiencing a similar issue (where I cannot enter any text into textboxes to e.g. log in or use the add-on explorer) and I got none of the errors above. All the output I got while trying to log in after executing the command
!./MATLABWindow -url=http://mathworks.com --disable-gpu
was:
GLib-GIO-[1;32mMessage[0m: [34m10:42:41.753[0m: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications.
[0313/104241.758859:ERROR:nss_util.cc(802)] After loading Root Certs, loaded==false: NSS error code: -8018
[0313/104241.814138:INFO:client_handler.cpp(150)] OnBeforeResourceLoad http://mathworks.com/
[0313/104242.122176:INFO:client_handler.cpp(150)] OnBeforeResourceLoad http://www.mathworks.com/
[0313/104242.156209:INFO:client_handler.cpp(150)] OnBeforeResourceLoad https://www.mathworks.com/
[0313/104242.224884:INFO:client_handler.cpp(162)] OnResourceResponse https://www.mathworks.com/
[0313/104242.229007:INFO:client_handler.cpp(481)] OnLoadStart
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/mbox-contents-95c6a4d9c82a8d20476522984666120b54192e9b.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/mbox-contents-95c6a4d9c82a8d20476522984666120b54192e9b.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
[0313/104242.468139:ERROR:render_process_host_impl.cc(2113)] Request for unknown Channel-associated interface: device::mojom::ScreenOrientationListener
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/scripts/satellite-5672ffbd64746d5bd3002853.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/scripts/satellite-5672ffbd64746d5bd3002853.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
[0313/104243.369665:INFO:client_handler.cpp(512)] OnLoadEnd:SETTING FOUCS
[0313/104243.560145:INFO:client_handler.cpp(512)] OnLoadEnd:SETTING FOUCS
[0313/104244.973149:INFO:client_handler.cpp(512)] OnLoadEnd:SETTING FOUCS
[0313/104244.973767:INFO:client_handler.cpp(512)] OnLoadEnd:SETTING FOUCS
[0313/104244.973937:INFO:client_handler.cpp(505)] OnLoadEnd
[0313/104244.973954:INFO:client_handler.cpp(512)] OnLoadEnd:SETTING FOUCS
[0313/104245.640779:INFO:client_handler.cpp(150)] OnBeforeResourceLoad https://nl.mathworks.com/?requestedDomain=
[0313/104245.678161:INFO:client_handler.cpp(162)] OnResourceResponse https://nl.mathworks.com/?requestedDomain=
[0313/104245.685755:INFO:client_handler.cpp(481)] OnLoadStart
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/mbox-contents-95c6a4d9c82a8d20476522984666120b54192e9b.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/mbox-contents-95c6a4d9c82a8d20476522984666120b54192e9b.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/scripts/satellite-5672ffbd64746d5bd3002853.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
A Parser-blocking, cross site (i.e. different eTLD+1) script, https://assets.adobedtm.com/d0cc0600946eb3957f703b9fe43c3590597a8c2c/scripts/satellite-5672ffbd64746d5bd3002853.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.
[0313/104246.205072:INFO:client_handler.cpp(512)] OnLoadEnd:SETTING FOUCS
[0313/104246.641569:INFO:client_handler.cpp(505)] OnLoadEnd
[0313/104246.641625:INFO:client_handler.cpp(512)] OnLoadEnd:SETTING FOUCS
It's pretty annoying.
I'm running on Ubuntu 18.10, kernel 4.18.0-16-generic, MATLAB version 9.5.0.944444 (R2018b).

Sign in to comment.


Jorge Martinez
Jorge Martinez on 30 Aug 2019
Edited: MathWorks Support Team on 7 Oct 2022
Hi there,
I would like to refer you to the MATLAB page on the Arch Linux Wiki.
Even when you do not use Arch as your Linux distribution this page contains very detailed instructions on how to get MATLAB to work under Linux, from installation to configuration and troubleshooting.
I found there the answer to the problem I had (the same problem aleper mentioned on starting SIMULINK).
  1 Comment
houssam deboucha
houssam deboucha on 19 May 2020
Edited: Laura Hild on 27 May 2020
i could fix this problem of matlab due to some library new on linux while matlab use old version so just you can go to the path /usr/local/MATLAB/R2017b/bin/glnxa64 then rename the libfreetype.so.6.11.1 to libfreetype.so.11.1.old that's all

Sign in to comment.


Renan Silva
Renan Silva on 21 Apr 2021
I am having a similar problem, R2018a on Linux Mint 20.01. I cannot open the Live Script Editor. When I run the command:
! bin / glnxa64 / MATLABWindow
The error that appears is this:
symbol lookup error: /lib/x86_64-linux-gnu/libpango-1.0.so.0: undefined symbol: g_log_structured_standard
I tried to move the ".so" to the "exclude" folder, but the errors became different and I had to undo the change.
I haven't been able to solve it yet.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!