2012-01-22 15:08:19 +0000 2012-01-22 15:08:19 +0000
88
88
Advertisement

如何在CentOS

Advertisement

上安装gcc 4.7.x/4.8.x 如何在CentOS 6.2+系统上安装gcc 4.7.x/4.8.x最简单的方法是什么?默认的RPM包中包含了gcc的旧版本。

Advertisement
Advertisement

答案 (8)

67
67
67
2013-01-26 13:54:36 +0000

ccentos.org 的 Tru Huynh 已经为 centos 构建了 redhat developer toolset 1.1,它包含 gcc 4.7.2

,所以你可以直接使用他的 repo 安装 gcc,然后立即安装。

42
42
42
2014-04-17 23:09:20 +0000

以下是如何获得devtoolset-2(包括gcc 4.8.1)

这是从 http://people.centos. org/tru/devtools-2/readme

wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++

已知问题:

  • 未签名的包
  • CentOS-6 devtoolset-2需要devtoolset-2-ide,它包含了整个Eclipse堆栈,但还没有构建
  • CentOS-6所有与maven相关的文件也没有构建

主要的变化来自devtools-1。 1:

  • /opt/centos不再使用
  • /opt/rh现在作为上游(作为SL版本)使用。
30
Advertisement
30
30
2013-11-15 13:21:43 +0000
Advertisement

有新版本的devtoolset 2.0。来自Cern的好心人在Scientific Linux上工作,他们创建了一个开放版本:

如果你使用的是CentOS (不是Scientific Linux),那么你必须从这里导入他们的GPG密钥,使用:

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

享受吧!

21
21
21
2013-11-18 20:33:21 +0000
# 1. Install a package with repository for your system:
# RHEL 6: `yum-config-manager --enable rhel-server-rhscl-6-rpmss`
# RHEL 7: `yum-config-manager --enable rhel-server-rhscl-7-rpms`
$ sudo yum install centos-release-scl # On CentOS 6/7+, install package centos-release-scl available in CentOS repository

# 2. Install the collection:
$ sudo yum install devtoolset-3

# 3. Start using software collections:
$ scl enable devtoolset-3 bash

$ sudo yum list devtoolset-3\*
2
Advertisement
2
2
2012-01-22 15:21:25 +0000
Advertisement

gnu gcc中看到,最新的稳定版本是4.62。4.7的版本可以下载编译,更多信息请看gnu gcc安装

2
2
2
2014-06-29 22:23:38 +0000

即使是在devtoolset的shell中,我的gcc 4.4.7也是如此。

1
Advertisement
1
1
2014-09-14 11:25:12 +0000
Advertisement

devtool1.1有一个问题,所以我做了一些修改–最后,这对我来说是有效的:首先运行

yum clean all

,而不是:

wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -O /etc/yum.repos.d/devtools-1.1.repo

现在打开/etc/yum.repos.d/devtools-1.repo,然后将:

http://people.centos.org/tru/devtools-2/$releasever/$basearch/RPMS

改为:

http://people.centos.org/tru/devtools-1.1/6/x86_64/RPMS/

或(如果你使用x8664,那么你可以使用x8664)。 1.repo,并将:

http://people.centos.org/tru/devtools-1.1/6/i386/RPMS/

改为:

yum install devtoolset-1.1

或((如果你使用的是x86))

&001

,最后运行:

&001

0
0
0
2012-05-13 06:30:24 +0000

实现这个目标的一个方法是从fedora版本库中获取src RPM,然后为你的目标系统重新编译。

Advertisement

Pytania pokrewne

2
2
4
4
4
Advertisement