Why does MATLAB R2018a display erroneous message on Ubuntu 16.04?

23 ビュー (過去 30 日間)
Michele Loverre
Michele Loverre 2018 年 3 月 18 日
編集済み: Ariel Surya Boiardi 2020 年 9 月 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
Ariel Surya Boiardi 2020 年 8 月 25 日
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 日
編集済み: 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 Center および File ExchangeIntroduction 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