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

Centos7安装nginx yum报错

Centos7安装nginx yum报错,yum源报错解决办法:
1、更新epel源后,出现yum报错

[root@hacker117 ~]# yum install epel-release(安装成功)
[root@hacker117 ~]# yum install nginx(安装失败,提示如下:)
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfileOne of the configured repositories failed (Unknown),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

在这里插入图片描述2、解决办法2种:

(1)更新阿里源或其它源(自行百度)
(2)修改源文件解决(采用这种)
在这里插入图片描述在这里插入图片描述可以执行下的命令,如果正常安装软件可以不用执行(我这里正常能安装)。

yum clean all
yum makecache
yum update

在这里插入图片描述如果还是报错怎么办:
直接改成这样:在后面 添加一行

mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch

在这里插入图片描述

http://www.lryc.cn/news/298848.html

相关文章:

  • 【机组】基于FPGA的32位算术逻辑运算单元的设计(EP2C5扩充选配类)
  • Asp .Net Core 系列:Asp .Net Core 集成 NLog
  • 一个基于 .NET 7 + Vue.js 的前后端分离的通用后台管理系统框架 - DncZeus
  • 更换商品图片日期JSON格式报错 - 序列化与反序列化日期格式设置
  • FastJson、Jackson使用AOP切面进行日志打印异常
  • 嵌入式大厂面试题(2)—— 富士康
  • 力扣_字符串4—编辑距离
  • MySQL篇----第二十篇
  • Promise 基础
  • RPA财务机器人之UiPath实战 - 自动化操作Excel进行财务数据汇总与分析之流程建立与数据读取、处理、汇总、分析
  • 华为机试真题实战应用【赛题代码篇】-输入整型数组和排序标识/根据排序标识flag给数组排序(附Java、C++和python代码)
  • 【算法随想录01】环形链表
  • macOS Sonoma 14.3.1(23D60)发布
  • 2024-02-11 叮当鸭-平台系统-第三次重构-目标确定
  • Android7.0-Fiddler证书问题
  • Kotlin:单例模式(项目使用实例)
  • vue百度地图的和element输入框/v-region的联动
  • 搜索+哈希/平衡树,LeetCode 987. 二叉树的垂序遍历
  • 蓝桥杯每日一题之内存问题
  • Django前后端分离之后端实践2
  • windowsserver 2016 PostgreSQL9.6.3-2升级解决其安全漏洞问题
  • Java实现免税店商城管理系统 JAVA+Vue+SpringBoot+MySQL
  • 【Linux】信号
  • [NISACTF 2022]easyssrf
  • 在Linux系统中设置全局HTTP代理的步骤与技巧
  • 即席查询框架怎么选?
  • 【C语言】实现双向链表
  • Python操作MySQL基础
  • 【数学建模】【2024年】【第40届】【MCM/ICM】【E题 财产保险的可持续性】【解题思路】
  • SpringCloud--Eureka注册中心服务搭建注册以及服务发现