首页 > 系统相关 >linux yum 命令错误常见记录

linux yum 命令错误常见记录

时间:2023-01-28 15:31:48浏览次数:51  
标签:错误 mirrors repo etc yum conf linux com

[root@localhost ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

--2023-01-28 14:30:34-- https://mirrors.aliyun.com/repo/Centos-7.repo

Resolving mirrors.aliyun.com (mirrors.aliyun.com)... failed: Name or service not known.

wget: unable to resolve host address ‘mirrors.aliyun.com’

解决方法 :
登录root用户,用vim /etc/resolv.conf ,打开rsolv.conf,添加DNS地址

nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 223.5.5.5
nameserver 223.6.6.6

若未解决,查看网络配置,使用​​ifconfig​​ 或 ​​ip addr​​查看网卡名,用 vim

/etc/sysconfig/network-scripts/ifcfg-(网卡名),查看网络参数是否正常

解决Linux(Loaded plugins: fastestmirror Please use /usr/bin/yum --help)--

yum命令出现Loaded plugins: fastestmirror

vi /etc/yum/pluginconf.d/fastestmirror.conf

把enabled=1改为0

vi /etc/yum.conf

把plugins=1改为0

yum>

sed -i "s/plugins=1/plugins=0" /etc/yum.conf

yum clean all


yum安装时出现错误[Errno 14] curl#6 - “Could not resolve host: ​​mirrors.aliyuncs.com​​; Unknown e解决办法。

http://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/6d0c3a488c282fe537794b5946b01e28c7f44db79097bb06826e1c0c88bad5ef-primary.sqlite.bz2: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; Connection timed out"
Trying other mirror.
vi /etc/resolv.conf 
向resolv.conf文件中添加下面内容

nameserver 114.114.114.114


标签:错误,mirrors,repo,etc,yum,conf,linux,com
From: https://blog.51cto.com/u_11585002/6024962

相关文章

  • 使用备份和还原将 SQL Server 数据库从 Windows 迁移到 Linux
    建议使用SQLServer的备份和还原功能将数据库从Windows上的SQLServer迁移到Linux上的SQLServer。在本教程中,将逐步完成使用备份和还原方法将数据库迁移到Linu......
  • Linux系统编程-文件IO
    文件IO标准库IO函数和linux系统调用IO函数的区别:标准C库的文件IO函数是跨平台的,在不同的平台上调用不同的系统API标准C库的IO函数有缓冲区,而linux系统调用的没有缓......
  • linux安装nginx
    一、安装准备(参考https://tech.powereasy.net/cpzsk/wzfwqwlaq/content_23804)1. 离线安装需要依赖GCC,通过以下命令可以检查GCC是否安装gcc–version银河麒麟是系统默......
  • DELL OpenManage Server Administrator (OMSA) for Linux安装
    1.下载和安装软件包从Dell官网(选择对应的机器和操作系统版本)下载DellOpenManageServerAdministrator软件包: 以下步骤是在DellR730和redhat7.5上运行的案例:1.使......
  • MAC M1芯片架构问题 Flutter 项目里用的flutter_blue库比较老,导致报该错误
    1. flutter_blue里面修改配置https://www.jianshu.com/p/b450a5589b33 不要直接打开Flutter项目,用AndroidStudio打开项目里的android目录,  由于我的项目......
  • 修改Nuget包路径解决grpc编译错误
    今天在写一个程序的时候,准备使用grpc,然而,然而使用自带的示例编译的时候却编译出错,错误提示如下:--grpc_out:protoc-gen-grpc:Thesystemcannotfindthepathspecified......
  • Google Earth Engine (GEE)——将影像导出Google硬盘中的易犯错误
    很多时候我们需要注意导出的错误信息,这里我们看到首先第一个错误就是我们选择波段的时候并没有按照指定的波段名称来进行,同时,我们不能直接导出影像集合,所以这里在导出的过程......
  • linux基本命令
    tail-1000fxx.out  实时查看文件catxx.out 查看文件more查看全部内容pwd 查看当前位置rm删除 rm-rf删除任何文件touch 创建文件grep过滤 参考:......
  • linux基础设置
    1、修改主机hostnamevi/etc/hostname修改hostsvi/etc/hosts192.168.10.201cdh201192.168.10.202cdh202192.168.10.203cdh203192.168.10.204cdh204重启电......
  • Linux find 命令
    Linuxfind命令用来在指定目录下查找文件。任何位于参数之前的字符串都将被视为欲查找的目录名。如果使用该命令时,不设置任何参数,则find命令将在当前目录下查找子目录与......