c++ centos7 version upgrade
来源:互联网 发布:健身减肥软件 编辑:程序博客网 时间:2024/05/04 07:19
最近在编译一个C++项目的时候遇到问题,"fatal error: stdatomic.h: No such file or directory",主要的原因是我的gcc版本(g++ --version)是4.8.1,需要升级到4.9及以上版本。下面就介绍两种升级c++版本的方法,笔者用的前一种解决掉的。
方法一:
在/etc/yum.repos.d下面添加repo:
>touch FedoraRepo.repo
然后再repo中加入如下内容:
[warning:fedora] name=fedora mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=$basearch enabled=1 gpgcheck=1 gpgkey=https://getfedora.org/static/34EC9CBA.txt更新gcc:
>yum -y update gcc gcc-c++
然后再看c++版本就变成为5.5.1了。
方法二:
通过源码包安装:
sudo yum install libmpc-devel mpfr-devel gmp-develcd ~/Downloadscurl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -Otar xvfj gcc-4.9.2.tar.bz2cd gcc-4.9.2./configure --disable-multilib --enable-languages=c,c++make -j 4make install
reference:
>https://gist.github.com/craigminihan/b23c06afd9073ec32e0c
Author:忆之独秀
Email:leaguenew@qq.com
注明出处:http://blog.csdn.net/lavorange/article/details/70854459
0 0
- c++ centos7 version upgrade
- RussianIME version 2 upgrade
- ebs version upgrade note
- WinAsm Studio Upgrade Version 5.1.6.0
- HOW-TO: upgrade nodejs to latest version
- VMWare SDK 学习与使用 Upgrade Hardware Version
- Standard procedure to upgrade Magento to the newest version
- How to upgrade rsf-1 to latest version
- CentOS 上升级Python 版本(upgrade python version)
- MariaDB upgrade from version 5.5.x to 10.0.x
- 12c upgrade preupgrd.sql available
- 清楚Magic Thumb的“Please upgrade to full version of Magic Thumb™”
- 错误:Can't upgrade read-only database from version 0 to 1
- 删除Migic Zoom 放大显示区域中的“Please upgrade to full version of Magic Zoom”
- android.database.sqlite.SQLiteException: Can't upgrade read-only database from version 0 to 1:解决
- 错误:Can't upgrade read-only database from version 0 to 1
- 【Sqlite】Can't upgrade read-only database from version 0 to 1
- SQLiteException: Can't upgrade read-only database from version 0 to 1报错!
- NSRunLoop是什么
- ubuntu 16.06 matlab2017a MEX/GCC Setup Problems
- 【深度剖析HMM(附Python代码)】5. 用HMM解决三个实际问题
- Spring mvc+hibernate+freemarker(实战)
- ThreadPoolExecutor运转机制及BlockingQueue详解
- c++ centos7 version upgrade
- selinux的管理
- eclipse优化
- 完整学习笔记之Android基础(详版)
- 由前序遍历和中序遍历推出后序遍历
- Java进阶(六)Java反射机制可恶问题NoSuchFieldException
- UGUI之修改Text字间距
- 数据挖掘领域的十大经典算法
- 斗地主AI算法——第十一章の被动出牌(5)