centos7 yum fastestmirror不能使用
来源:互联网 发布:广州人口数据 编辑:程序博客网 时间:2024/05/22 00:20
[root@localhost ~]# yum install lrzsz
Loaded plugins: fastestmirror
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; Unknown error"
===============================================================================
第一步:
[root@localhost ~]# vi /etc/yum/pluginconf.d/fastestmirror.conf
[main]
enabled=1//把1改为0
verbose=0
always_print_best_host = true
socket_timeout=3
# Relative paths are relative to the cachedir (and so works for users as well
# as root).
hostfilepath=timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook
#include_only=.nl,.de,.uk,.ie
===============================================================================
第二步:
[root@localhost ~]# vi /etc/yum.conf
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1//将plugins的值修改为0
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=23&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release
# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
===============================================================================
继续运行,出现如下错误
[root@localhost ~]# yum install lrzsz
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; Unknown error"
One of the configured repositories failed (Unknown),
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.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-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 much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
===============================================================================
nameserver 8.8.4.4
search localdomain
- centos7 yum fastestmirror不能使用
- yum禁用fastestmirror 插件
- centos7安装Python3.6以及解决yum不能使用问题
- CentOS 使用yum命令安装出现错误提示:Loaded plugins: fastestmirror, refresh-packagekit, security
- CentOS 使用yum命令安装出现错误提示:Loaded plugins: fastestmirror, refresh-packagekit, security
- yum 不能正常使用
- centos7使用yum安装mysql
- CentOS7使用yum安装nginx
- CentOS7 使用 yum 安装 chrome
- CentOS7使用yum安装nginx
- centos7 使用yum安装php7
- Centos7 yum使用阿里源
- CentOS7使用yum安装mysql
- CentOS7使用yum安装MySQL
- CentOS yum upgrade, Error Loaded plugins: fastestmirror
- centos yum报错Loaded plugins: fastestmirror
- Centos 5.5不能使用yum
- centos7下使用yum安装mysql
- 关于Java小程序在页面中的层级显示问题
- 测试驱动开发(TDD)的一些思考
- Angular购物车的加减
- Oracle中的替换函数replace和translate函数
- CDH5.4.7安装Hadoop集群数据库无法连接
- centos7 yum fastestmirror不能使用
- 海航科技集团旗下易建科技构建双活云化架构 为电商保驾护航
- 接入原生模块的时候,发现无法识别方法名
- Java+Windows+ffmpeg实现视频转换
- 友盟多渠道打包
- 进入阿里必备知识-第三步-TDDL数据框架
- java shiro配置记住密码功能 RememberMe功能怎么实现
- 人机对话这件事为什么难?| 清华x-lab人工智能研习社
- 兄弟连 linux 笔记