欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 科技 > 名人名企 > -bash gcc command not found解决方案(CentOS操作系统)

-bash gcc command not found解决方案(CentOS操作系统)

2024/10/25 15:35:32 来源:https://blog.csdn.net/2301_78527293/article/details/142868765  浏览:    关键词:-bash gcc command not found解决方案(CentOS操作系统)

CentOS7 为例,执行以下语句 :

yum install gcc

如果下载不成功,并且网络没有问题。

执行以下语句 :

cp -r /etc/yum.repos.d /etc/yum.repos.d.bakrm -f /etc/yum.repos.d/*.repocurl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoyum clean allyum makecacheyum update

然后检查 yum 源速度 :

yum repolist

出现以下就没有问题了

yum repolist                                                            
已加载插件:fastestmirror                                                                 
Loading mirror speeds from cached hostfile                                                * base: mirrors.aliyun.com                                                               * extras: mirrors.aliyun.com                                                             * updates: mirrors.aliyun.com                                                            
源标识                        源名称                                                状态  
base/7/x86_64                 CentOS-7 - Base - mirrors.aliyun.com                  10,072
extras/7/x86_64               CentOS-7 - Extras - mirrors.aliyun.com                   526
updates/7/x86_64              CentOS-7 - Updates - mirrors.aliyun.com                6,173
repolist: 16,771                      

在配置一下下面的

1、直接关闭防火墙
systemctl stop firewalld2、禁止firewall开机启动
systemctl disable firewalld3、查看状态
systemctl status firewalld #出现dead表示关闭成功11.关闭selinux

参考自 :
https://blog.csdn.net/2402_86403828/article/details/142065102

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com