Centos7安装nginx yum报错

news/2025/2/16 1:15:35/

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.ppmy.cn/news/1350703.html

相关文章

Unity下使用Sqlite

sqlite和access类似是文件形式的数据库&#xff0c;不需要安装任何服务&#xff0c;可以存储数据&#xff0c;使用起来还是挺方便的。 首先需要安装DLL 需要的DLL 我们找到下面两个文件放入Plugins目录 Mono.Data.Sqlite.dll System.Data.dll DLL文件位于Unity的安装目录下的…

Linux第48步_编译正点原子的出厂Linux内核源码

编译正点原子的出厂 Linux 内核源码&#xff0c;为后面移植linux做准备。研究对象如下&#xff1a; 1)、linux内核镜像文件“uImage” 路径为“arch/arm/boot”&#xff1b; 2)、设备树文件“stm32mp157d-atk.dtb” 路径为“arch/arm/boot/dts” 3)、默认配置文件“stm32m…

django的基本使用-ORM(二)

一、简介 ORM对象关系映射&#xff0c;它允许你使用类和对象对数据库进行操作&#xff0c;从而避免通过SQL语句操作数据库 模型层: 负责和数据库之间进行通信 模型是一个Python类&#xff0c;它是由django.db.models.Model派生出的子类 一个模型类代表数据库中的一张表 模型类…

蓝桥杯刷题day08——完全日期

1、题目描述 如果一个日期中年月日的各位数字之和是完全平方数&#xff0c;则称为一个完全日期。 例如&#xff1a;2021年6月5日的各位数字之和为20216516&#xff0c;而16是一个完全平方数&#xff0c;它是4的平方。所以2021年6月5日是一个完全日期。 请问&#xff0c;从200…

STM32Cubmax DAC 采集

一、概念 DMA&#xff0c;全称为&#xff1a; Direct Memory Access&#xff0c;即直接存储器访问&#xff0c; DMA 传输将数据从一个 地址空间复制到另外一个地址空间。 当 CPU 初始化这个传输动作&#xff0c;传输动作本身是由 DMA 控制器 来实行和完成。典型的例子就是移动…

备战蓝桥杯---组合数学2

本专题主要介绍容斥原理。 大家高中的时候肯定接触过韦恩图&#xff0c;容斥原理比较通俗的理解就是减去所有可能并加上重叠的部分。 我们直接看公式&#xff1a; 知道后&#xff0c;我们先看道模板题&#xff1a; 下面是AC代码&#xff1a; #include<bits/stdc.h> us…

矩阵在计算机图像处理中的应用

矩阵在计算机图像处理中是非常核心的概念&#xff0c;因为它们为表示和操作图像数据提供了一种非常方便和强大的方式。以下是矩阵在计算机图像处理中的一些关键作用&#xff1a; 图像表示&#xff1a;在计算机中&#xff0c;图像通常被表示为像素矩阵&#xff0c;也就是二维数组…

VTK 三维场景的基本要素(相机) vtkCamera

观众的眼睛好比三维渲染场景中的相机&#xff0c;在VTK中用vtkCamera类来表示。vtkCamera负责把三维场景投影到二维平面&#xff0c;如屏幕&#xff0c;相机投影示意图如下图所示。 1.与相机投影相关的要素主要有如下几个&#xff1a; 1&#xff09;相机位置: 相机所处的位置…