CentOS yum 安装 g++ 4.7.2 & c++11
From this answer to "Install gcc 4.7 on CentOS [6.x]", the easiest way to get g++ 4.7, and the required tools and libraries, for CentOS 5.x is via the devtools package:
cd /etc/yum.repos.d
wget http://people.centos.org/tru/devtools/devtools.repo
yum --enablerepo=testing-devtools-5 install devtoolset-1.0
Since you're running g++ manually (as opposed to through make), you'll need to update your $PATHvariable so your shell will use the new gcc, g++, etc. binaries:
export PATH=/opt/centos/devtoolset-1.0/root/usr/bin/:$PATH
At this point, your g++ should be version 4.7.0
$ g++ --version
g++ (GCC) 4.7.0 20120507 (Red Hat 4.7.0-5)
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Be aware that installing gcc and associated tools and libraries in this manner relies on the repository maintainer to keep their packages up to date.
If you're interested in keeping your gcc up to date, you may want to consider building gcc from source.
Also, compiling programs with a different version of g++ and libstdc++ than are installed on your system can cause all kinds of Fun, coping with which is beyond the scope of this answer. It may be worth moving to a Linux distribution that has support for what you're doing.
CentOS yum 安装 g++ 4.7.2 & c++11的更多相关文章
- centos 怎么安装 g++
centos 怎么安装 g++ 找了n久 找到一个实用的 有gcc 但是 是老版本的 tarball 编译 nmap 的时候说机器没有g++ 各种方法都试过 然后 找到下面这个方法: cento ...
- centos yum 安装 mongodb 以及php扩展
centos yum 安装 mongodb 以及php扩展 投稿:hebedich 字体:[增加 减小] 类型:转载 MongoDB是一个基于分布式文件存储的数据库.由C++语言编写.旨在为WEB应用 ...
- 【转】CentOS yum安装和卸载软件的使用方法
在CentOS yum安装和卸载软件的使用方法安装方法安装一个软件时. CentOS yum -y install httpd安装多个相类似的软件时 CentOS yum -y install ...
- CentOS yum 安装LAMP PHP5.4版本
CentOS yum 安装LAMP PHP5.4版本 [日期:2015-06-04] 来源:Linux社区 作者:rogerzhanglijie [字体:大 中 小] Linux系统版本:C ...
- CentOS yum安装mcrypt
CentOS yum安装mcrypt 本篇排错的前提是只想用yum安装,不想使用源码包编译安装. php依赖一下包: #yum install libmcrypt libmcrypt-deve ...
- CentOS yum安装mcrypt详细图解教程
CentOS yum安装mcrypt详细图解教程 在Linux的发行版CentOS 6.3 系统下,LAMP(Linux+Apache+Mysql+php)环境搭建好后发现PHPMyadmin提示 “ ...
- centos yum 安装php5.6
centos yum 安装php5.6 卸载 php之前的版本: yum remove -y php-common 配置源 CentOS 6.5的源 rpm -Uvh http://ftp.iij.a ...
- redhad借用CentOs yum 安装
RedHat linux 默认是安装了yum软件的,但是由于激活认证的原因让redhat无法直接进行yum安装一些软件,如果我们需要在redhat下直接yum安装软件,我们只用把yum的源修改成Cen ...
- linux centos yum安装LAMP环境
centos 6.5 1.yum安装和源代码编译在使用的时候没啥区别,但是安装的过程就大相径庭了,yum只需要3个命令就可以完成,源代码需要13个包,还得加压编译,步骤很麻烦,而且当做有时候会出错,源 ...
随机推荐
- iscroll refresh无效解决办法
最近用iscroll.js 写移动页面,效果还是挺好的.但,还是会遇到重新初始化的问题. var myScroll = new IScroll('#rule_wrapper',{ click:true ...
- 随机生成一串字符串(java)
该随笔为开发笔记 今天在公司接手了一个项目,在看该项目老代码时,发现上一位大佬写的随机取一串字符串还不错,在此做一次开发笔记 在他的基础上我做了点改动,但是原理一样 /** * 随机取一段字符串方法1 ...
- DELPHI中枚举类型数据的介绍和使用方法
在看delphi程序的时候看到aa=(a,b,c,d);这样的东西,还以为是数组,同事说是函数,呵呵,当然这两个都不屑一击,原来这样式子是在声明并付值一个枚举类型的数据.下边写下来DELPHI中枚举类 ...
- Windows驱动_WFP之一WFP是什么
现在的网络安全问题,越来越受到重视,微软在VISTA以后,使用了WFP平台来代替之前XP和03中的基于包过滤的技术,比如Transport Driver Interface(TDI)过滤,Networ ...
- HTML5自定义属性的设置与获取
<div id="box" aaa="bbb" data-info="hello"></div> <body& ...
- apach hadoop2.6 集群利用Phoenix 4.6-hbase 批量导入并自动创建索引
基础环境: 1.安装apach 版本hadoop2.6 2.部署hbase1.0.0 3.下载phoenix-4.6.0-HBase-1.0.下载地址(http://mirror.nus.edu.sg ...
- 6.1_springboot2.x分布式-整合SpringCloud
1.SpringCloud简介 Spring Cloud是一个分布式的整体解决方案.Spring Cloud 为开发者提供了在分布式系统(配置管理,服务发现,熔断,路由,微代理,控制总线,一次性t ...
- html5本地存储(一)------ web Storage
在html5中与本地存储相关的两个相关内容:Web Storage 与本地数据库 web Storage存储机制是对html4中的cookie存储机制的一个改善.web Storage就是在web上 ...
- plsql创建一个表、序列、和触发器
plsql创建表后不能直接让id递增,因此要手动创建,下面是例子: 1.创建表 SQL: create table student(id number primary key,name varchar ...
- GetModuleHandleW 分析
首先查询MSDN,可以清楚地看到 位于kernel32 dll 里面. 有目标就好办,找到这个dll,然后,开工,进入IDA. 跳啊 就到下面那块了. 遗憾的是...显然不是这里阿,实际上下一块调用的 ...