当前位置: 首页 > news >正文

-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


http://www.mrgr.cn/news/48422.html

相关文章:

  • 探索 Python 的函数与模块
  • 从丢失到找回只需一步:2024年TOP4超级硬盘恢复软件推荐
  • 【论文速读】| AutoSafeCoder:通过静态分析和模糊测试保障LLM代码生成安全的多智能体框架
  • GWAS揭示酸性磷酸酶ACP2在缺磷条件下通过丝氨酸代谢调节水稻光合作用
  • 基于STM32的太阳跟踪系统设计
  • 如何减少 Webpack 的打包体积
  • 豆包MarsCode:AI编码助手,注册即享多重好礼!
  • 手表手机蓝牙通信实测可用!!!
  • 【AIGC】ChatGPT提示词Prompt高效编写模式:思维链、Self-Consistency CoT与Zero-Shot CoT
  • 单片机(学习)2024.10.11
  • 绿色激光器定制主要标准有哪些
  • 设计模式——原型模式(4)
  • 使用机器学习边缘设备的快速目标检测
  • 安科瑞智能电表:先充值,后用电
  • Java项目:150 基于SSM+JSP的服装商城系统
  • 个人博客系统测试报告
  • 向日葵macOS定制包功能上线 轻松定制企业主被控软件
  • 如何实现数组和 List 之间的转换?
  • [含文档+PPT+源码等]精品基于springboot实现的原生Andriod心理健康辅导平台
  • 图算法之Bellman-Ford 算法(最短路径)详细解读