12

I realize there are many questions like this, but the difference from the others is that my libstdc++.so.6 actually does appear to be up to date enough (see below for the strings it exports). This is an error that comes up when trying to load a dynamic library that i just compiled myself. apt-get upgrade and the like tell me libstdc++.so.6 already is up to date (on version libstdc++6 is already the newest version (9.1.0-2ubuntu2~18.04)).

Full error i get when loading this library (in MATLAB R2019a):

'/home/dee/git_repos/Titta/TobiiMex/TobiiMex_matlab/64/TobiiMex_matlab.mexa64':
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by
/home/dee/git_repos/Titta/TobiiMex/TobiiMex_matlab/64/TobiiMex_matlab.mexa64)

output of strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC:

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.14
GLIBC_2.6
GLIBC_2.4
GLIBC_2.18
GLIBC_2.16
GLIBC_2.3.4
GLIBC_2.17
GLIBC_2.3.2
GLIBCXX_DEBUG_MESSAGE_LENGTH

What can i try to fix this?

7 Answers7

4

Installing libstdc++6 and gcc-9 helped me. Hope it will help you too.

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-9
sudo apt install libstdc++6
3

may export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu/ help?

Brent81
  • 139
3

I had a similar issue with libstdc++.so.6 which was working in R on command line but not from the rstudio IDE. Instead of having the latest version of it in /usr/lib/x86_64-linux-gnu (rstudio default) it was in a conda environment (/home/user/myproject/envs/default/lib). For me it was the answer of Brent81 that solved it. I used export LD_LIBRARY_PATH=/home/user/myproject/envs/default/lib and it worked.

2

Search for other versions of libstdc++.so.6 in your system. You are probably picking up an older version of the dynamic lib.

Jacko
  • 137
  • 1
    Why voting this down? In FreeBSD libstdc++.so.6 is within gcc packages which could coexist. So the lib could coexist, which will raise such problem! – Jimmy Koerting Oct 20 '21 at 15:21
1

I had the same issue today. Previously I installed Insomnia using snap

And just uninstalling and reinstalling using snap didn't change anything.

But installing it using apt-get solve for me


Just be aware that your personal data will not be automatically imported by the new installation

In fact, I'm not sure what happens to the user data after uninstalling the snap version of the software. Case you figure it out, please let me know

Guilherme
  • 451
0

Installing matlab-support package in ubuntu 18.04 solved the problem for me

sudo apt install matlab-support

It mention something about renaming libraries, that can be of help:

Tried renaming /opt/MATLAB/R2021b/sys/os/glnx86/libgcc_s.so.1
Tried renaming /opt/MATLAB/R2021b/sys/os/glnx86/libstdc++.so.6
Renaming /opt/MATLAB/R2021b/sys/os/glnxa64/libgcc_s.so.1 to /opt/MATLAB/R2021b/sys/os/glnxa64/libgcc_s.so.1.bak.
Renaming /opt/MATLAB/R2021b/sys/os/glnxa64/libstdc++.so.6 to /opt/MATLAB/R2021b/sys/os/glnxa64/libstdc++.so.6.bak.
LaloGo
  • 1
0

i had a similar problem

Make sure the LD_LIBRARY_PATHdoesn't point to undesire location

echo $LD_LIBRARY_PATH
TripleS
  • 101