在CentOS 7上找不到GLIBCXX_3.4.21 [英] GLIBCXX_3.4.21 not found on CentOS 7

查看:145
本文介绍了在CentOS 7上找不到GLIBCXX_3.4.21的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在CentOS上将我的gcc版本从4.7更新到了5.4,但是现在我在编译程序时遇到以下错误

I recently updated my gcc version on CentOS from 4.7 to 5.4, but now I am getting the following error when I compile my program

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

I找到了一些​​解决方案,但我仍然无法解决此问题。这些是我在 whereis gcc

I found some solutions , but I am still not able to fix the issue. These are the paths I found with whereis gcc

gcc: /usr/bin/gcc /usr/lib/gcc /usr/local/bin/gcc /usr/local/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz

并使用此 libstdc 软件包(用于CentOS)。

and used this libstdc package for CentOS.

推荐答案

尝试 export LD_LIBRARY_PATH = / usr / local / lib:/ usr / lib:/ usr /本地/ lib64:/ usr / lib64

这篇关于在CentOS 7上找不到GLIBCXX_3.4.21的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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