在Scientific linux 6上安装gcc 4.8时出错

时间:2015-04-22 07:01:52

标签: c++ linux gcc

每当我尝试在科学linux 6上安装gcc 4.8时,我都会收到以下错误。有谁知道错误的任何修复:

[root@ABC]# yum install libstdc++-devel.i686
Loaded plugins: refresh-packagekit, security
Setting up Install Process
http://people.centos.org/tru/devtools-2/6.6/x86_64/RPMS/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: testing-devtools-2-centos-6.6. Please verify its path and try again
编辑:yum repolist 输出:

Loaded plugins: refresh-packagekit, security
http://people.centos.org/tru/devtools-2/6.6/x86_64/RPMS/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://people.centos.org/tru/devtools-2/6.6/x86_64/RPMS/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
repo id                       repo name                                      status
sl                            Scientific Linux 6.6 - x86_64                  6,665
sl-security                   Scientific Linux 6.6 - x86_64 - security updat   420
sl6x                          Scientific Linux 6x - x86_64                   6,665
sl6x-security                 Scientific Linux 6x - x86_64 - security update   420
testing-devtools-2-centos-6.6 testing 2 devtools for CentOS 6.6                  0
repolist: 14,170

编辑:wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo 输出:

--2015-04-22 13:05:01--  http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
Resolving linuxsoft.cern.ch... 2001:1458:201:95::100:13, 2001:1458:201:95::100:14, 2001:1458:201:95::100:d, ...
Connecting to linuxsoft.cern.ch|2001:1458:201:95::100:13|:80... failed: Connection timed out.
Connecting to linuxsoft.cern.ch|2001:1458:201:95::100:14|:80... failed: Connection timed out.
Connecting to linuxsoft.cern.ch|2001:1458:201:95::100:d|:80... failed: Connection timed out.

1 个答案:

答案 0 :(得分:1)

  1. 在您的主机上安装Devtoolset-repo

    wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo

  2. 安装devtoolset yum install devtoolset-2
  3. 测试已安装的环境

    scl enable devtoolset-2 bash 
    gcc --version