Errors are presented when matlab 2021b run non unbuntu
5 次查看(过去 30 天)
显示 更早的评论
When i run matlab, the following errors occurs. I do not know why.
0 个评论
回答(1 个)
Meet
about 10 hours 前
Hi,
These errors may be caused by missing module, or MATLAB being unable to locate certain module. Please try the following troubleshooting steps:
1. Verify that the modules are all installed on your machine, by executing the following commands in your computer's terminal.
$ sudo apt-get install overlay-scrollbar
If the module is installed, and the error still persist, MATLAB may be unable to find the modules.
2. Please execute the following command in order to read the module in the correct location
$ env LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0/modules matlab
If the error has been resolved on starting up MATLAB, continue to step 3 for that module. If there are still startup errors, the modules may be installed in a different location. You can figure out where the module is installed, and adjust the above command with the right path. The following is one way in which you can figure out where a module is installed:
locate overlay-scrollbar-gtk.so
3. Execute the following commands in MATLAB to install soft links in your MATLAB directory to the location of the modules.
cd <matlabinstallation>/cefclient/sys/os/glnxa64
ln -s /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/overlay-scrollbar-gtk.so overlay-scrollbar-gtk.so
To undo the above change:
cd <matlabinstallation>/cefclient/sys/os/glnxa64
rm overlay-scrollbar-gtk.so
4. After these steps, if you get the following error: "/usr/local/MATLAB/R2021b/bin/glnxa64/MATLAB: symbol lookup error: /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so: undefined symbol: ubuntu_gtk_set_use_overlay_scrollbar", this means that "/usr/lib/x86_64-linux-gnu/gtk-2.0/modules/liboverlay-scrollbar.so" can’t resolve the symbol "ubuntu_gtk_set_use_overlay_scrollbar".
This symbol is normally provided by Ubuntu's "/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0" file, but the "/usr/local/MATLAB/R2021b/cefclient/sys/os/glnxa64/libgtk-x11-2.0.so.0" is loaded instead and does not provide the missing symbol.To resolve this error, you can set aside "/usr/local/MATLAB/R2021b/cefclient/sys/os/glnxa64/libgtk-x11-2.0.so.0" so that the "/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0" gets used. This should resolve the "ubuntu_gtk_set_use_overlay_scrollbar" error, but may lead to some other incompatibility with libraries in this same directory and might require further libraries to be set aside.
$ cd /usr/local/MATLAB/R2021b/cefclient/sys/os/glnxa64
$ sudo mkdir notused
$ sudo mv libgtk-x11-2.0.so.0* libgdk-x11-2.0.so.0* notused/
$ cd -
5. If you get the following "GTK" message "GLib-GIO-Message: 14:39:27.004: Using the 'memory' GSettings backend. Your settings will not be saved or shared with other applications." you can remove it by setting an environmental variable. Execute the following commands in your terminal:
$ export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/
$ /usr/local/MATLAB/R2021b/bin/matlab
If the message is resolved, then you can add the export command to your ".bashrc" file to have it execute automatically.
Hope this helps to resolve the issue!!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!