MATLAB Answers

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

982 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 28 Aug 2018
Edited: MathWorks Support Team on 28 Aug 2018
NOTE: In the instructions below we use the phrase "_set aside_ somelibrary.so" a couple of times, this does not mean only moving somelibrary.so itself, it means moving all files which start with somelibrary.so, so for example also somelibrary.so.1, somelibrary.so.1.0, etc. Scroll down to the bottom of this answer to see example Linux shell commands which use the * wildcard with which you can easily move all those files starting with a particular name.
Due to some library compatibility issues, MATLAB may not be able to launch MATLABWindow on your particular distribution/version of Linux. Here are some steps to detect and work around the incompatibility.
In MATLAB:
>> cd(matlabroot)
>> ! bin/glnxa64/MATLABWindow
----------------
1)
If you see:
bin/glnxa64/MATLABWindow: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Then you should:
This is a known Ubuntu issue. As root:
# apt-get install libgconf-2-4
----------------
2)
If you see:
bin/glnxa64/MATLABWindow: symbol lookup error: _somelibrary_: undefined symbol: g_log_structured
or
bin/glnxa64/MATLABWindow: symbol lookup error: _somelibrary_: undefined symbol: g_log_structured_standard
Then you should:
Set aside MATLAB’s copy of the libglib-2.0.so library, located in <matlabroot>/cefclient/sys/os/glnxa64.
See instructions below.
----------------
3)
If you see:
bin/glnxa64/MATLABWindow: symbol lookup error: _somelibrary_: undefined symbol: FT_Get_Var_Blend_Coordinates
or
bin/glnxa64/MATLABWindow: symbol lookup error: _somelibrary_: undefined symbol: FT_Done_MM_Var
Then you should:
Set aside MATLAB’s copy of the libfreetype.so.6 library, located in <matlabroot>/bin/glnxa64.
See instructions below.
----------------
4)
If you see:
bin/glnxa64/MATLABWindow: path to/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by _somelibrary_)
Then you should:
Set aside MATLAB’s copy of the libstdc++.so.6 library, located in <matlabroot>/sys/os/glnxa64
See instructions below
----------------
5)
If you see:
A mini-browser window appears showing www.mathworks.com
Then you should:
Close the mini-browser. MATLABWindows is working.
----------------
To set aside MATLAB’s copy of the libstdc++.so.6 library (for example), please navigate to MATLAB R2017b installation location in your system and remove the “libstdc++.so.6” library file shipped with MATLAB R2017b, so that MATLAB will use the system version of that library:
<matlabroot>/sys/os/glnxa64
Note: Here <matlabroot> is the location in your system where MATLAB R2017b is installed.
Eg: ‘/usr/local/MATLAB/R2017B’.
Following are the commands to execute in linux shell to perform the above mentioned operation: (You may need root privilege)
# cd /usr/local/MATLAB/R2017b (or wherever you may have installed MATLAB)
# cd cefclient/sys/os/glnxa64 (or whichever directory is indicated in above table)
# mkdir exclude
# mv libglib-2.0.so* exclude/ (or whichever library is indicated in above table)

  25 Comments

Greg
Greg on 23 Sep 2020 at 3:48
How does one "set aside" libraries from an installation BD? The disc mounts as read-only (obviously). Please don't tell me I'm supposed to suffer through copying the entire disc content to local storage then run these hack workarounds before I can install R2020b.
Linux is terrible enough as it is, I don't want to band-aid my way through an install onto a "fully supported" operating system - RHEL 8
Per system requirements page: "MATLAB and Simulink have been validated on the Linux distributions listed on this page."
Edit, update: I went ahead and copied the .ISO content to a local directory, and "set aside" libcrypto and libssl per John Bollinger on 22 May 2020. The install window appears incredibly slowly, but when I get to the FIK page (i.e., nearly the very first thing), the "Next" button never enables.
Walter Roberson
Walter Roberson on 23 Sep 2020
Greg, as I read through it appears to me that this is an issue that shows up after installation and does not affect installation. There would therefore not be any need to set aside in read-only installation media. (There could potentially be difficulty if your admins provides an installed matlab by mounting a shared read-only device.)
Greg
Greg on 23 Sep 2020
Walter, my apologies - I attributed my specific situation to the comments posts from Jasper Vinkenvleugel and John Bollinger. They had the same library conflict I do, so I mistakenly assumed it was also occuring during install. For me, it is indeed happening within the install script provided for Linux distributions.
The update edit paragraph in my previous comment is the current behavior on my RHEL 8.2 system. Amusingly enough, shortly after that post, I tried running the silent install per installer_input.txt. It appears to have work beautifully (but I haven't tried to run any code to see if there are additional downstream issues).

Sign in to comment.

More Answers (7)


Jeff Mandel
Jeff Mandel on 10 Oct 2020 at 23:26
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.

  0 Comments

Sign in to comment.


aleper
aleper 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

Tim Hilt
Tim Hilt on 9 Mar 2018
Exactly the same thing as with user above is happening for me. Same Matlab- and Command-Output! Any help or recommendation will be greatly appreciated, since there seems to be no other Post regarding this particular Issue.

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
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
Hi there,
I would like to refer you to the MATLAB page on the Arch Linux Wiki.
https://wiki.archlinux.org/index.php/MATLAB
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
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.


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

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!