首页 > 系统相关 >关于centos7yum安装出错问题

关于centos7yum安装出错问题

时间:2024-07-29 20:09:51浏览次数:8  
标签:centos7yum CentOS centos mirrors releasever 出错 aliyun http 安装

报错信息

[root@192 ~]# yum install -y nginx
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"


 One of the configured repositories failed (未知),
 and yum doesn't have enough cached data to continue. At this point the only
 safe 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.

创建新的/etc/yum.repos.d/CentOS-Base.repo文件

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS
# updates unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base - Aliyun
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates
[updates]
name=CentOS-$releasever - Updates - Aliyun
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - Aliyun
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - Aliyun
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

执行

sudo yum clean all
sudo yum makecache
sudo yum update

标签:centos7yum,CentOS,centos,mirrors,releasever,出错,aliyun,http,安装
From: https://www.cnblogs.com/yohoolook/p/18330921

相关文章

  • playbook+roles安装jdk实战
    目录结构host文件夹用于存放主机清单文件hosts文件hosts文件内容如下:(仅供参考)[proxy]node2[web]node3node4playbook-all-roles.yml文件用于指定执行哪个role的文件(命名可以自定义)文件内容如下:(仅供参考)因为roles文件夹下只有nginx一个文件夹,所以-role:java就指......
  • playbook+roles安装nginx实战
    基本目录结构host文件夹用于存放主机清单文件hosts文件hosts文件内容如下:(仅供参考)[proxy]node2[web]192.168.xx.xxplaybook-all-roles.yml文件用于指定执行哪个role的文件(命名可以自定义)文件内容如下:(仅供参考)因为roles文件夹下只有nginx一个文件夹,所以-role:ngi......
  • ansible实战__使用安装包安装nginx
    目录结构[root@mastertar_install_nginx]#tree.├──nginx-1.22.1.tar.gz├──nginx_install_tar.yaml└──nginx.service文件解释nginx-1.22.1.tar.gznginx安装包,其他版本也可以nginx.service为了设置系统启动(systemctlstartnginx)等具体文件[Unit]De......
  • ansible实战__使用yum方法安装nginx
    目录结构[root@masteryum_install_nginx]#tree.├──CentOS-Base.repo└──nginx_install.yaml如果yum源有问题需要建CentOS-Base.repo文件,没有则不需要报错信息可参考如下链接:CentOS-Base.repo文件内容#CentOS-Base.repo##Themirrorsystemusesthecon......
  • 易优cms空间安装易优,如何去除URL中的index.php
    普遍适用于百度云虚拟主机百度云bch云主机支持nginx原生态伪静态规则写法,请将规则写到/webroot/目录下的bcloud_nginx_user.conf文件中(没有则创建),重载站点生效。首先我们写一个bcloud_nginx_user.conf文件,写入一下代码:location/{  if(!-e$request_filename){    ......
  • 织梦DedeCMSv5.7安装初始化数据体验包失败的解决方法
    有些朋友在安装织梦DEDECMS程序时,安装初始化数据体验包失败,因为体验包数据比较大,网络不好的时候很容易失败,下面是一种比较保险的初始化数据体验包安装方法.1、先安装一个全新的DedeCMSv5.7GBK程序,安装时不要勾选安装初始化体验包.2、下载数据体验包(dedecmsv5.6与V5.7通......
  • Adobe2024全家桶免费安装包下载路径+方法教程
    Adobe发布了其全家桶的最新版本Adobe2024。Adobe全家桶是一组由AdobeSystems开发和发行的图形设计、影像编辑与网络开发的软件产品套装,包括图像编辑软件Photoshop、矢量图形设计软件Illustrator等多款知名软件。Adobe全家桶的更新不仅意味着新功能的增加和性能的提升,也预示着......
  • Adobe2024全家桶下载+详细安装教程
    “我电脑里安装了20多个Adobe软件,但真正用到的只有PS。”近日,有网友在社交平台发帖称,自己的电脑里安装了大量Adobe软件,但实际上只经常使用Photoshop。对此,有其他网友回复道:“你这是买椟还珠,Adobe全家桶里有很多宝藏工具,比如AE、PR、AU等。”Adobe全家桶永久免费领取入口:http......
  • kubeadm安装部署K8S-1.30.2
    1、环境准备1.1、节点规划#CentOSLinuxrelease7.9.2009(Core)master0110.202.30.22 #4C8Gnode0110.202.30.30 #4C8Gnode0210.202.30.31 #4C8G1.2、配置hosts主机名解析#vim/etc/hosts10.202.30.22master0110.202.30.30nod......
  • 基于Docker安装RocketMQ
    1、拉取RocketMQ镜像代码:dockerpullapache/rocketmq成功示例:Usingdefaulttag:latestlatest:Pullingfromapache/rocketmq2d473b07cdd5:Pullcomplete23700610a3bb:Pullcompleteb58ea7c35511:Pullcompletea5224a1908d3:Pullcompleteb4d9fb37957c:Pull......