如何在CentOS 7.2上安装带有yum的gcc 5.3? [英] How to Install gcc 5.3 with yum on CentOS 7.2?
问题描述
我使用CentOS 7.2
当我使用 yum groupinstall开发工具
时,gcc为4.8。 5,像这样:
我想安装gcc 5.3
如何通过 yum
?
更新:
通常人们想要最新版本的gcc,并且devtoolset保持最新,所以也许你想要devtoolset-N,其中N = {4,5,6,7 ...},查看你系统上最新版本的yum)。例如,更新了N = 7下面的cmds。
以devtoolset-7的gcc-7.2.1为例。首先,您需要启用软件集合,然后在devtoolset中提供它-7:
sudo yum install centos-release-scl
sudo yum install devtoolset-7-gcc *
scl enable devtoolset-7 bash
哪个gcc
gcc --version
I am using CentOS 7.2
When I use yum groupinstall "Development Tools"
, gcc is 4.8.5, like this:
I would like to install gcc 5.3
How to approach this with yum
?
Update:
Often people want the most recent version of gcc, and devtoolset is being kept up-to-date, so maybe you want devtoolset-N where N={4,5,6,7...}, check yum for the latest available on your system). Updated the cmds below for N=7.
There is a package for gcc-7.2.1 for devtoolset-7 as an example. First you need to enable the Software Collections, then it's available in devtoolset-7:
sudo yum install centos-release-scl
sudo yum install devtoolset-7-gcc*
scl enable devtoolset-7 bash
which gcc
gcc --version
这篇关于如何在CentOS 7.2上安装带有yum的gcc 5.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!