MATLAB Answers

0

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

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

5 Answers

Answer by MathWorks Support Team on 28 Aug 2018
Edited by MathWorks Support Team on 28 Aug 2018
 Accepted Answer

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)

  8 Comments

I had the error decribed in 2) (under Kubuntu 17.10). Deleting libglib-2.0.so solved not the problem. I had to delete all libglib-2.0.so-files (after discussing the problem with the matlab-support):
  • libglib-2.0.so
  • libglib-2.0.so.0
  • libglib-2.0.so.0.4200.2
After that everything works fine!
I am not entirely sure about the exact content of this article in the past but I believe that strictly speaking the answer has always explicitly explained that "setting aside" meant moving more than just one file. Nevertheless based on the feedback from Dominik above as well as from some other MATLAB users, I have added a note at the top of the answer to explicitly highlight this.
Thanks a lot, solved the issue on Ubuntu 18.04.1 LTS.

Sign in to comment.


Answer by 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

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.
Hi,
link seems to solve this problem.
Best regards

Sign in to comment.


Answer by 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

  2 Comments

don't skip the first command: cd(matlabroot)

Sign in to comment.


Answer by Tech Support on 13 Apr 2018

Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin

  0 Comments

Sign in to comment.


Answer by Ion Lazar on 23 Apr 2018

This worked for me, thank you.

  0 Comments

Sign in to comment.