centos6 yum 安装 install c++4.8 gcc4.8

cd /etc/yum.repos.d
wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo
yum --enablerepo=testing-1.1-devtools-6 install devtoolset-1.1-gcc devtoolset-1.1-gcc-c++

This will install it most likely into /opt/centos/devtoolset-1.1/root/usr/bin/

Then you can tell your compile process to use the gcc 4.7 instead of 4.4 with the CC variable

export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc
export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp
export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++

For g++ 4.8.2, change 1.1 to 2 everywhere, and change --enablerepo=testing-1.1-devtools-6 to--enablerepo=testing-devtools-2-centos-6

There is new version of devtoolset 2.0. Nice people from Cern working on Scientific Linux createdan open version:

If you use CentOS (not Scientific Linux), then you will have to import their GPG key from here using:

rpm --import http://www.scientificlinux.org/documentation/gpg/RPM-GPG-KEY-cern

Enjoy!

EL6 gcc-4.8 http://www.hop5.in/yum/el6/repoview/gcc.html

or this

http://puias.princeton.edu/data/puias/DevToolset/6/x86_64/ /etc/yum.repos.d/DevToolset.repo

[DevToolset-2]
name=RedHat DevToolset v2 $releasever - $basearch
baseurl=http://people.centos.org/tru/devtools-2/$basearch/
enabled=1
gpgcheck=0

Testing run

# yum install devtoolset-2-gcc-4.8.2 devtoolset-2-gcc-c++-4.8.2
# /opt/rh/devtoolset-2/root/usr/bin/gcc --version

export 做好软链接

ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/
hash -r
gcc --version
时间: 2024-08-01 10:42:43

centos6 yum 安装 install c++4.8 gcc4.8的相关文章

centos6 yum 安装memcached

centos6 yum 安装memcached 分类: php2013-03-08 18:08 7355人阅读 评论(0) 收藏 举报 目录(?)[+] centos 6 第一二步省略,直接yum安装 1. 安装第三方软件库 wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.5.2-2.rf.src.rpmrpm -ivh rpmforge-release-0.5.2-2.rf.src.rpm

Linux -- Centos6 yum安装相关问题与处理

Centos6 yum安装相关问题与处理 由于要使用yum下载文件,突然yum下载不了想要的文件,想更换yum源,结果得重新安装yum 来自本人GitHub地址https://github.com/mrsmallyi/LinuxNote/blob/master/yum.md 一.问题1 [[email protected] ~]# yum -v There was a problem importing one of the Python modules required to run yum.

Centos6 yum安装openldap+phpldapadmin+TLS+双主配置

原文地址:http://54im.com/openldap/centos-6-yum-install-openldap-phpldapadmin-tls-%E5%8F%8C%E4%B8%BB%E9%85%8D%E7%BD%AE.html 钿畑的文章索引 1.概念介绍 2. 环境介绍 2. 准备工作 3. yum部署ldap 4. phpldapadmin安装 5.ldap客户端配置 6.用户目录自动挂载 6.1 服务器端配置 6.2 客户端配置 7.配置TLS传输加密 8.配置openldap双

centos6 yum安装最新版mysql5.7

在看来mysql5.7诸多改进介绍后,决定也安装一个试用下:本文将使用rpm的方式来安装. 环境:OS: CentOS6.5 x86_64 最小化安装MEM: 1GCPU: 1 1. 本文连着上一篇安装GCC5.3之后,新版本的glibc环境需设置到全局环境 shell> strings /usr/lib64/libstdc++.so.6|grep GLIBCXX # 查看当前版本shell> rm -f /usr/lib64/libstdc++.so.6shell> ln -s /us

centos6 yum安装nginx

[[email protected] ~]#rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm [[email protected] ~]#yum info nginx [[email protected] ~]#yum install nginx [[email protected] ~]# service nginx start Starting

centos6 yum install lamp过程记录

centos6 使用yum install lamp操作记录 centos6.8  ##修改yum源为阿里云源 [[email protected] ~]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# /bin/mv CentOS-Base.repo CentOS-Base.repo.old [[email protected] yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.r

centos6.5 x86_64下yum安装lnmp+phpmyadmin

平台:centos6.5 x86_64 1,关闭SElinux vi /etc/selinux/config 将SELINUX=enforcing改为SELINUX=disabled reboot 2,添加yum源 rpm -Uvh http://mirrors.yun-idc.com/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6

centos6.5 yum 安装zabbix

关掉相关安全设置,要不出现一大堆乱七八糟的问题 service iptables stop chkconfig iptables off setenforce 0 sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config 卸载相关软件包(如果有的话),保持干净环境 yum remove -y mysql* httpd* php* nginx* zabbix* 安装软件包和依赖包 yum -y install wget

Centos6.5之yum安装LAMP+wordpress

一.配置yum源 利用挂载光盘或其他网上yum源 都可以,自行配置. 二.安装开发包及库文件以及配置文件 [[email protected] ~]# yum -y install httpd* [[email protected] ~]# yum -y install mysql* [[email protected] ~]# yum -y install php* [[email protected] ~]# yum -y install mod_ssl mod_perl mod_auth_