您现在的位置是:CentOS通过yum安装高版本gcc4.8

CentOS通过yum安装高版本gcc4.8

Linux 日期:2020-06-09点击:452

unrecognized command line option "-std=c++11"

#gcc 4.8
curl -Lks http://www.hop5.in/yum/el6/hop5.repo > /etc/yum.repos.d/hop5.repo
yum install gcc gcc-g++ -y
gcc --version


[root@localhost pdo_sqlsrv-5.3.0]# yum install gcc gcc-g++ -y
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.bfsu.edu.cn
 * extras: mirror.bit.edu.cn
 * updates: mirror.bit.edu.cn
hop5                                                                                             | 2.9 kB     00:00
hop5/primary_db                                                                                  | 166 kB     00:07
No package gcc-g++ available.
Resolving Dependencies
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-23.el6 will be updated
--> Processing Dependency: gcc = 4.4.4 for package: libtool-2.2.6-15.5.el6.x86_64
--> Processing Dependency: gcc = 4.4.7-23.el6 for package: gcc-c++-4.4.7-23.el6.x86_64
---> Package gcc.x86_64 0:4.8.2-8.el6 will be an update
--> Processing Dependency: libgomp = 4.8.2-8.el6 for package: gcc-4.8.2-8.el6.x86_64
--> Processing Dependency: cpp = 4.8.2-8.el6 for package: gcc-4.8.2-8.el6.x86_64
--> Processing Dependency: libgcc >= 4.8.2-8.el6 for package: gcc-4.8.2-8.el6.x86_64
--> Processing Dependency: libmpc.so.2()(64bit) for package: gcc-4.8.2-8.el6.x86_64
--> Running transaction check
---> Package cpp.x86_64 0:4.4.7-23.el6 will be updated
---> Package cpp.x86_64 0:4.8.2-8.el6 will be an update
---> Package gcc-c++.x86_64 0:4.4.7-23.el6 will be updated
---> Package gcc-c++.x86_64 0:4.8.2-8.el6 will be an update
--> Processing Dependency: libstdc++-devel = 4.8.2-8.el6 for package: gcc-c++-4.8.2-8.el6.x86_64
--> Processing Dependency: libstdc++ = 4.8.2-8.el6 for package: gcc-c++-4.8.2-8.el6.x86_64
---> Package libgcc.x86_64 0:4.4.7-23.el6 will be updated
---> Package libgcc.x86_64 0:4.8.2-8.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-23.el6 will be updated
---> Package libgomp.x86_64 0:4.8.2-8.el6 will be an update
---> Package libmpc.x86_64 0:0.8.3-0.3.svn855.el6 will be installed
---> Package libtool.x86_64 0:2.2.6-15.5.el6 will be updated
---> Package libtool.x86_64 0:2.4.2-21.el6 will be an update
--> Running transaction check
---> Package libstdc++.x86_64 0:4.4.7-23.el6 will be updated
---> Package libstdc++.x86_64 0:4.8.2-8.el6 will be an update
---> Package libstdc++-devel.x86_64 0:4.4.7-23.el6 will be updated
---> Package libstdc++-devel.x86_64 0:4.8.2-8.el6 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
 Package                         Arch                   Version                              Repository            Size
========================================================================================================================
Updating:
 gcc                             x86_64                 4.8.2-8.el6                          hop5                  17 M
Installing for dependencies:
 libmpc                          x86_64                 0.8.3-0.3.svn855.el6                 hop5                  47 k
Updating for dependencies:
 cpp                             x86_64                 4.8.2-8.el6                          hop5                 5.7 M
 gcc-c++                         x86_64                 4.8.2-8.el6                          hop5                 6.9 M
 libgcc                          x86_64                 4.8.2-8.el6                          hop5                  83 k
 libgomp                         x86_64                 4.8.2-8.el6                          hop5                 100 k
 libstdc++                       x86_64                 4.8.2-8.el6                          hop5                 289 k
 libstdc++-devel                 x86_64                 4.8.2-8.el6                          hop5                 1.5 M
 libtool                         x86_64                 2.4.2-21.el6                         hop5                 659 k

Transaction Summary
========================================================================================================================
Install       1 Package(s)
Upgrade       8 Package(s)



#gcc 4.9
yum install centos-release-scl -y
yum install devtoolset-3-toolchain -y
scl enable devtoolset-3 bash
gcc --version



标签: Linux gcc

站长简介

姓名:喻理
微信:yuli0927
邮箱:yuli0927@126.com
不懂业务的运维工程师不是一个好程序员。

分类

最新文章

热门文章

友情链接