/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15&#

2019-01-02 20:02发布

How can I get GLIBCXX_3.4.15 in Ubuntu? I can't run some programs that I'm compiling.

When I do:

strings /usr/lib/libstdc++.so.6 | grep GLIBC

I get:

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
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.4
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH

Thanks for any help!

18条回答
春风洒进眼中
2楼-- · 2019-01-02 20:14

I had the same problem before, and fixed that, the steps could be found on this Fixing error "GLIBCXX_3.4.15" on matlab

查看更多
冷夜・残月
3楼-- · 2019-01-02 20:16

Same thing with gcc version 4.8.1 (GCC) and libstdc++.so.6.0.18. Had to copy it here /usr/lib/x86_64-linux-gnu on my ubuntu box.

查看更多
余生请多指教
4楼-- · 2019-01-02 20:17

I was trying to get clang to work (which also requires 6.0.15), and while poking around I found it was installed at /usr/local/lib/libstdc++.so.6.0.15. It installed there when I installed graphite (an experimental gcc version).

If you need access to libraries at that location, then you’ll need to define LD_LIBRARY_PATH as:

export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64

I was able to get clang to work after doing this. Hope that is helpful to someone.

查看更多
千与千寻千般痛.
5楼-- · 2019-01-02 20:21

I have been avoiding this issue in the past by simply linking libstdc++ statically with this parameter sent to g++ when linking my executable:

-static-libstdc++

If linking in the library statically is an option this is probably the quickest work-around.

查看更多
骚的不知所云
6楼-- · 2019-01-02 20:21

For this error, I copied the latest libstdc++.so.6.0.17 from other server, and removed the soft link and recreated it.

1. Copy the the libstdc++.so.6.0.15 or latest from other server to the affected system.
In my case SUSE linux 11 SP3 had latest.
2. rm libstdc++.so.6
3. ln -s libstdc++.so.6.0.17 libstdc++.so.6 (under /usr/lib64 directory).

nJoy

查看更多
谁念西风独自凉
7楼-- · 2019-01-02 20:23

I'm compiling gcc 4.6 from source, and apparently

sudo make install 

didn't catch this one. I dug around and found

gcc/trunk/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.15

I copied it in to /usr/lib and redirected libstdc++.so.6 to point to the new one, and now everything works.

查看更多
登录 后发表回答