MATLAB Answers

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

753 ビュー (過去 30 日間)
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

採用された回答

MathWorks Support Team
MathWorks Support Team 2018 年 8 月 28 日
編集済み: MathWorks Support Team 2018 年 8 月 28 日
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)
  27 件のコメント

サインインしてコメントする。

その他の回答 (8 件)

József Mózer
József Mózer 2021 年 1 月 8 日
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.
  2 件のコメント
Alex Denisenko
Alex Denisenko 2021 年 4 月 9 日 17:49
I had following error:
bin/glnxa64/MATLABWindow: symbol lookup error: /usr/lib/libpango-1.0.so.0: undefined symbol: g_memdup2
and your solution helped! Thanks!

サインインしてコメントする。



Jeff Mandel
Jeff Mandel 2020 年 10 月 10 日
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.

aleper
aleper 2018 年 3 月 8 日
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 件のコメント
bb
bb 2018 年 3 月 24 日
Hi,
link seems to solve this problem.
Best regards

サインインしてコメントする。


Hariprasad
Hariprasad 2018 年 4 月 11 日
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 件のコメント
Winston Yu
Winston Yu 2018 年 8 月 17 日
don't skip the first command: cd(matlabroot)

サインインしてコメントする。


Tech Support
Tech Support 2018 年 4 月 13 日
編集済み: MathWorks Support Team 2021 年 2 月 1 日
Hi,
If you are still experiencing this issue, please contact MathWorks support:
-Justin
  1 件のコメント
Rogier Delporte
Rogier Delporte 2019 年 3 月 13 日
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).

サインインしてコメントする。


Jorge Martinez
Jorge Martinez 2019 年 8 月 30 日
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 件のコメント
houssam deboucha
houssam deboucha 2020 年 5 月 19 日
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

サインインしてコメントする。


Júlio César Chaves
Júlio César Chaves 2020 年 6 月 20 日
Install a java virtual machine.
sudo install dnf
sudo dnf install java-1.8.0-openjdk ant -y

Community Treasure Hunt

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

Start Hunting!

Translated by