GCC升级至高版本

栏目: 服务器 · 编程工具 · 发布时间: 7年前

内容简介:系统版本:CentOS 7.2 gcc原有版本:4.8 要升级为:6.1.0注意:测试过升级到6.4版本,但各种报错,无耐放弃相关场景:在做某个操作时提示“/lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found”

系统版本:CentOS 7.2 gcc原有版本:4.8 要升级为:6.1.0

注意:测试过升级到6.4版本,但各种报错,无耐放弃

相关场景:在做某个操作时提示“/lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found”

gcc官方下载网址: http://ftp.gnu.org/gnu/gcc/

安装过程:此过程比较长,大概要持续3个小时

tar -jxvf gcc-6.1.0.tar.bz2

cd gcc-6.1.0

./contrib/download_prerequisites

mkdir build

cd build

../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib

make

make install

升级完成后,系统还是使用旧版本的gcc,需要再进行以下操作:

cp /usr/local/lib64/libstdc++.so.6.0.22 /lib64

cd /lib64

rm -rf libstdc++.so.6

ln -s libstdc++.so.6.0.22 libstdc++.so.6

此时执行如下命令就行可以看到GLIBCXX_3.4.22了:

strings /lib64/libstdc++.so.6 | grep GLIBC

GCC升级至高版本

查看系统中gcc版本:可以看到升级成功

GCC升级至高版本

Linux公社的RSS地址https://www.linuxidc.com/rssFeed.aspx

本文永久更新链接地址: https://www.linuxidc.com/Linux/2018-11/155395.htm


以上所述就是小编给大家介绍的《GCC升级至高版本》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

An Introduction to the Analysis of Algorithms

An Introduction to the Analysis of Algorithms

Robert Sedgewick、Philippe Flajolet / Addison-Wesley Professional / 1995-12-10 / CAD 67.99

This book is a thorough overview of the primary techniques and models used in the mathematical analysis of algorithms. The first half of the book draws upon classical mathematical material from discre......一起来看看 《An Introduction to the Analysis of Algorithms》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具