更详细地了解gcc版本和GLIBC,GLIBCXX版本 [英] Understanding the gcc version and the GLIBC, GLIBCXX versions in more detail

查看:840
本文介绍了更详细地了解gcc版本和GLIBC,GLIBCXX版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我具有以下本地gcc,g ++版本:

Assume I have the following local gcc, g++ version:

$ gcc -v
$ g++ -v
gcc version 6.3.1

与编译器版本相比,我不了解以下内容的关系和含义:

I don't understanding the relation and meaning of the following compared to my compiler version:

这是什么意思?

/usr/lib64/libstdc++.so.6

尝试运行二进制文件,但出现此错误, GLIBCXX_3.4.20 指的是什么?为什么数字以3开头?

Trying to run a binary and I get this error, what is GLIBCXX_3.4.20 referring to? why is the number starting with 3?

/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found

这是什么?

$ strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
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

ldd版本怎么样?

ldd --version
ldd (GNU libc) 2.17

我无法将所有这些版本号链接在一起.

I can't link all these version numbers together.

推荐答案

我无法将所有这些版本号链接在一起.

I can't link all these version numbers together.

正如评论中已经提到的, ABI页面告诉您可以找到 GLIBCXX _... g ++ 版本之间的关系. GLIBCXX_3.4.20 对应于 g ++-4.9.0 .

As already mentioned in the comments, the ABI page tells you the relationship between GLIBCXX_... and g++ versions. GLIBCXX_3.4.20 corresponds to g++-4.9.0.

由于您拥有 g ++-6.3.1 ,因此您应该具有 libstdc ++.so.6 GLIBCXX_3的版本.4.22 ,但您显然没有.

Since you have g++-6.3.1, you should have a version of libstdc++.so.6 with GLIBCXX_3.4.22 in it, but you clearly don't.

似乎您有多个版本的 libstdc ++.so.6 :一个在/lib64 中,另一个在/usr中/lib64 .我猜他们中的一个很旧,根本不应该在系统上.

It looks like you have multiple versions of libstdc++.so.6: one in /lib64 and another in /usr/lib64. I am guessing that one of them is old, and shouldn't be on the system at all.

P.S.GLIBC的版本与您的问题完全无关,并且与此无关.

P.S. The version of GLIBC has nothing to with your problem, and is irrelevant.

这篇关于更详细地了解gcc版本和GLIBC,GLIBCXX版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆