{"id":78,"date":"2018-02-21T17:26:57","date_gmt":"2018-02-21T09:26:57","guid":{"rendered":"https:\/\/www.5high.net\/?p=78"},"modified":"2018-02-21T17:26:57","modified_gmt":"2018-02-21T09:26:57","slug":"linux%e4%b9%8bcentos-6%e9%80%9a%e8%bf%87yum%e5%ae%89%e8%a3%85gcc-4-9-5-2%e7%ad%89%e9%ab%98%e7%89%88%e6%9c%acgcc","status":"publish","type":"post","link":"https:\/\/sumju.net\/?p=78","title":{"rendered":"Linux\u4e4bCentOS 6\u901a\u8fc7yum\u5b89\u88c5gcc 4.9 5.2\u7b49\u9ad8\u7248\u672cgcc"},"content":{"rendered":"<p>gcc 4.8 \u5b89\u88c5<\/p>\n<p>[root@DS-VM-Node239 ~]# curl -Lks http:\/\/www.hop5.in\/yum\/el6\/hop5.repo > \/etc\/yum.repos.d\/hop5.repo<br \/>\n[root@DS-VM-Node239 ~]# yum install gcc gcc-g++ -y<br \/>\n[root@DS-VM-Node239 ~]# gcc &#8211;version<br \/>\ngcc (GCC) 4.8.2 20131212 (Red Hat 4.8.2-8)<br \/>\nCopyright \u00a9 2013 Free Software Foundation, Inc.<br \/>\n\u672c\u7a0b\u5e8f\u662f\u81ea\u7531\u8f6f\u4ef6\uff1b\u8bf7\u53c2\u770b\u6e90\u4ee3\u7801\u7684\u7248\u6743\u58f0\u660e\u3002\u672c\u8f6f\u4ef6\u6ca1\u6709\u4efb\u4f55\u62c5\u4fdd\uff1b<br \/>\n\u5305\u62ec\u6ca1\u6709\u9002\u9500\u6027\u548c\u67d0\u4e00\u4e13\u7528\u76ee\u7684\u4e0b\u7684\u9002\u7528\u6027\u62c5\u4fdd\u3002<br \/>\n[root@DS-VM-Node239 ~]# g++ &#8211;version<br \/>\ng++ (GCC) 4.8.2 20131212 (Red Hat 4.8.2-8)<br \/>\nCopyright \u00a9 2013 Free Software Foundation, Inc.<br \/>\n\u672c\u7a0b\u5e8f\u662f\u81ea\u7531\u8f6f\u4ef6\uff1b\u8bf7\u53c2\u770b\u6e90\u4ee3\u7801\u7684\u7248\u6743\u58f0\u660e\u3002\u672c\u8f6f\u4ef6\u6ca1\u6709\u4efb\u4f55\u62c5\u4fdd\uff1b<br \/>\n\u5305\u62ec\u6ca1\u6709\u9002\u9500\u6027\u548c\u67d0\u4e00\u4e13\u7528\u76ee\u7684\u4e0b\u7684\u9002\u7528\u6027\u62c5\u4fdd\u3002<br \/>\n[root@DS-VM-Node211 ~]#<br \/>\ngcc 4.9 \u5b89\u88c5<\/p>\n<p>[root@DS-VM-Node239 ~]# yum install centos-release-scl -y<br \/>\n[root@DS-VM-Node239 ~]# yum install devtoolset-3-toolchain -y<br \/>\n[root@DS-VM-Node239 ~]# scl enable devtoolset-3 bash<br \/>\n[root@DS-VM-Node239 ~]# gcc &#8211;version<br \/>\ngcc (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)<br \/>\nCopyright (C) 2014 Free Software Foundation, Inc.<br \/>\nThis is free software; see the source for copying conditions.  There is NO<br \/>\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<\/p>\n<p>[root@DS-VM-Node239 ~]# g++ &#8211;version<br \/>\ng++ (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)<br \/>\nCopyright (C) 2014 Free Software Foundation, Inc.<br \/>\nThis is free software; see the source for copying conditions.  There is NO<br \/>\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<\/p>\n<p>[root@DS-VM-Node239 ~]# gfortran &#8211;version<br \/>\nGNU Fortran (GCC) 4.9.2 20150212 (Red Hat 4.9.2-6)<br \/>\nCopyright (C) 2014 Free Software Foundation, Inc.<\/p>\n<p>GNU Fortran comes with NO WARRANTY, to the extent permitted by law.<br \/>\nYou may redistribute copies of GNU Fortran<br \/>\nunder the terms of the GNU General Public License.<br \/>\nFor more information about these matters, see the file named COPYING<\/p>\n<p>[root@DS-VM-Node239 ~]#<br \/>\ngcc 5.2 \u5b89\u88c5<\/p>\n<p>[root@DS-VM-Node239 ~]# yum install centos-release-scl -y<br \/>\n[root@DS-VM-Node239 ~]# yum install devtoolset-4-toolchain -y<br \/>\n[root@DS-VM-Node239 ~]# scl enable devtoolset-4 bash<br \/>\n[root@DS-VM-Node239 ~]# gcc &#8211;version<br \/>\ngcc (GCC) 5.2.1 20150902 (Red Hat 5.2.1-2)<br \/>\nCopyright (C) 2015 Free Software Foundation, Inc.<br \/>\nThis is free software; see the source for copying conditions.  There is NO<br \/>\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<\/p>\n<p>[root@DS-VM-Node239 ~]# g++ &#8211;version<br \/>\ng++ (GCC) 5.2.1 20150902 (Red Hat 5.2.1-2)<br \/>\nCopyright (C) 2015 Free Software Foundation, Inc.<br \/>\nThis is free software; see the source for copying conditions.  There is NO<br \/>\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<\/p>\n<p>[root@DS-VM-Node239 ~]#<\/p>\n","protected":false},"excerpt":{"rendered":"<p>gcc 4.8 \u5b89\u88c5 [root@DS-VM-Node239 ~]# curl -Lks http:&hellip; <a href=\"https:\/\/sumju.net\/?p=78\" class=\"more-link read-more\" rel=\"bookmark\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">Linux\u4e4bCentOS 6\u901a\u8fc7yum\u5b89\u88c5gcc 4.9 5.2\u7b49\u9ad8\u7248\u672cgcc<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[14],"tags":[],"class_list":{"0":"post-78","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-linux","7":"h-entry","9":"h-as-article"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":1,"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":80,"href":"https:\/\/sumju.net\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/80"}],"wp:attachment":[{"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sumju.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}