linux怎么升级gcc版本号,linux yum升级gcc版本

在上一篇文章linux快速升级gcc版本中,gcc被yum升级到了4.8.2,今天重新在新的机器上升级gcc的时候,居然出现下面的问题:

# yum install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ -y

Loaded plugins: fastestmirror

Determining fastest mirrors

* base: mirror.as24220.net

* extras: mirror.as24220.net

* updates: mirror.as24220.net

http://people.centos.org/tru/devtools-2/6/x86_64/RPMS/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid

Trying other mirror.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: testing-devtools-2-centos-6. Please verify its path and try again

估计是yum源地址出现问题了,下面来看怎么解决.

解决方法:

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

yum --nogpgcheck install devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++ -y

ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/

hash -r

gcc --version

gcc (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)

Copyright (C) 2013 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.

好了,gcc又升级成功了,如果还有问题就只能请大家自己去解决.

夜空- 本站版权

1、本站所有主题由该文章作者发表,该文章作者与夜空享有文章相关版权

2、其他单位或个人使用、转载或引用本文时必须同时征得该文章作者和夜空的同意

3、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责

4、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意

5、原文链接:blog.slogra.com/post-666.html

post-666.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值