1. <i id='m3p9d'><div id='m3p9d'><ins id='m3p9d'></ins></div></i>
    2. <dl id='m3p9d'></dl>
      <fieldset id='m3p9d'></fieldset>
      1. <span id='m3p9d'></span>

          <ins id='m3p9d'></ins>
            <i id='m3p9d'></i>

          1. <tr id='m3p9d'><strong id='m3p9d'></strong><small id='m3p9d'></small><button id='m3p9d'></button><li id='m3p9d'><noscript id='m3p9d'><big id='m3p9d'></big><dt id='m3p9d'></dt></noscript></li></tr><ol id='m3p9d'><table id='m3p9d'><blockquote id='m3p9d'><tbody id='m3p9d'></tbody></blockquote></table></ol><u id='m3p9d'></u><kbd id='m3p9d'><kbd id='m3p9d'></kbd></kbd>

            <code id='m3p9d'><strong id='m3p9d'></strong></code>

            <acronym id='m3p9d'><em id='m3p9d'></em><td id='m3p9d'><div id='m3p9d'></div></td></acronym><address id='m3p9d'><big id='m3p9d'><big id='m3p9d'></big><legend id='m3p9d'></legend></big></address>

            CentOS6.5用yum升级gcc详解

            • 时间:
            • 浏览:12
            • 来源:124软件资讯网

                CentOS6.5用yum升级gcc详解

              由于需要用到C++11  ,但CentOS自带的gcc4.4.7不支持  ,以是决议升级gcc  。

                操作如下:

                #备份

                mv /etc/yum.repos.d/devtools-2.repo /etc/yum.repos.d/devtools-2.repo.bak 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

                yum install devtoolset-2-gcc-c++

                这三个文件会被下载到: /opt/rh/devtoolset-2/root/ 中 ,接下来设置软链接:

                #备份原来4.4.7版本

                mv /usr/bin/gcc /usr/bin/gcc-4.4.7

                mv /usr/bin/g++ /usr/bin/g++-4.4.7

                mv /usr/bin/c++ /usr/bin/c++-4.4.7

                #设置软链接

                ln -s /opt/rh/devtoolset-2/root/usr/bin/gcc /usr/bin/gcc

                ln -s /opt/rh/devtoolset-2/root/usr/bin/c++ /usr/bin/c++

                ln -s /opt/rh/devtoolset-2/root/usr/bin/g++ /usr/bin/g++

                gcc -v