Why does MATLAB R2018a display erroneous message on Ubuntu 16.04?

23 次查看(过去 30 天)
Why does MATLAB R2018a display the following erroneous message on Ubuntu 16.04?
MATLAB is selecting SOFTWARE OPENGL rendering.
/usr/local/MATLAB/R2018a/bin/glnxa64/MATLAB: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version
`GLIBCXX_3.4.22' not found (required by /usr/local/MATLAB/R2018a/bin/glnxa64/libCppMicroServices.so.3.1.1)
I followed the classic installation instructions and I also installed matlab-support.

回答(2 个)

ziyu wang
ziyu wang 2018-3-23
Try these commands, you need to upgrade your libstdc++6 version. If first command can't run, just run other three. I hope it can help you.
%code
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9
sudo apt-get upgrade libstdc++6
  7 个评论
Deep
Deep 2018-12-4
I tried these steps for Matlab R2018b and it stops after displaying MATLAB is selecting SOFTWARE OPENGL rendering. Any solutions?
Thanks!
Ming-Feng Ho
Ming-Feng Ho 2019-6-23
Thanks. It works for me so far. I am using MATLAB R2019a on Ubuntu through MATLAB-AWS-reference-architecture. (https://github.com/mathworks-ref-arch/matlab-on-aws)

请先登录,再进行评论。


Ariel Surya Boiardi
Hello, this thread is pretty old, but looking for the error on google is found, so I post my solution in the hope of helping someone out.
I had a similar issue when running gmsh from matlab
>> system('gmsh -save -format m trapezoid.msh')
my error string was
gmsh: /usr/local/MATLAB/R2020a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib64/libgmsh.so.4.5)
gmsh: /usr/local/MATLAB/R2020a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib64/libTKBRep.so.7)
gmsh: /usr/local/MATLAB/R2020a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib64/libTKMath.so.7)
gmsh: /usr/local/MATLAB/R2020a/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /lib64/libTKCDF.so.7)
To my understanding this is ome of the MANY problems of MATLAB on Linux due to the fact that matlab ships outdated copies of core libraries is its folders and tries to take priority over the system libraries.
It seems to me (maybe i broke something else) that these problems are solved by masking the offending library, in this instance
cd /usr/local/MATLAB/R2020a/sys/os/glnxa64/
sudo rename 'libstdc++' 'deact.libstdc++' *
Of course it is possible to mask the library in many ways, but it is better not to remove it completely (you never know).
I really hope Mathworks will start using system libraries insted of custom ones one day.
  2 个评论
Kenneth Dyson
Kenneth Dyson 2020-9-29
Sorry, I am not familiar with the 'rename' command.
What are you accomplishing with that code?
When I run it I get:
Can't modify constant item in postincrement (++) at (user-supplied code), near "libstdc++"
I am running MATLAB R2020a on Ubuntu 20.04
Ariel Surya Boiardi
编辑:Ariel Surya Boiardi 2020-9-30
I am not very expert either, but I think rename simply looks for the first string in the filenames speficied by the last string (in my case * for all files in the current dir) and substitutes the matched string with the second string.
You might want to be using
sudo mv 'libstdc++' 'deact.libstdc++'
but I did not test this solution, so please make a copy of the original file bofore running!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by