【发布时间】:2021-03-19 14:18:54
【问题描述】:
我关注centos7中的tutorialinstall GCC,安装成功,但是无法启用。
这是命令。
sudo yum group install "开发工具"
sudo yum install centos-release-scl
sudo yum install devtoolset-7
scl 启用 devtoolset-7 bash
gcc --version
这是运行日志:
-bash-4.2$ sudo yum group install "Development Tools"
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* centos-sclo-rh: mirror.lzu.edu.cn
* centos-sclo-sclo: mirrors.ustc.edu.cn
* epel: hkg.mirror.rackspace.com
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
Maybe run: yum groups mark install (see man yum)
No packages in any requested group available to install or update
-bash-4.2$
-bash-4.2$
-bash-4.2$
-bash-4.2$
-bash-4.2$ sudo yum install centos-release-scl
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* centos-sclo-rh: mirror.lzu.edu.cn
* centos-sclo-sclo: mirrors.ustc.edu.cn
* epel: hkg.mirror.rackspace.com
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
Package centos-release-scl-2-3.el7.centos.noarch already installed and latest version
Nothing to do
-bash-4.2$
-bash-4.2$
-bash-4.2$
-bash-4.2$ sudo yum install devtoolset-7
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* centos-sclo-rh: mirror.bit.edu.cn
* centos-sclo-sclo: mirrors.ustc.edu.cn
* epel: my.mirrors.thegigabit.com
* extras: mirrors.ustc.edu.cn
* updates: mirrors.ustc.edu.cn
Package devtoolset-7-7.1-4.el7.x86_64 already installed and latest version
Nothing to do
-bash-4.2$
-bash-4.2$
-bash-4.2$ scl enable devtoolset-7 bash
bash-4.2$
bash-4.2$
bash-4.2$ gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 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