站長資訊網
最全最豐富的資訊網站

centos7 yum fastestmirror不能使用怎么辦

下面由centos基礎教程欄目給大家介紹centos7 yum fastestmirror不能使用的解決辦法,希望對需要的朋友有所幫助!

centos7 yum fastestmirror不能使用怎么辦

centos7 yum fastestmirror不能使用

[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

==============================================

原因:沒有配置resolv.conf

解決方法:

到/etc目錄下配置resolv.conf加入nameserver IP,如:

[root@localhost ~]# vi /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 search localdomain

保存再次運行命令就可以。

贊(0)
分享到: 更多 (0)
網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號
久久精品视频观看| 国产在线精品一区二区三区不卡 | 国产在线精品观看免费观看| 热99精品只有里视频最新| 日韩精品免费视频| 国产女精品视频在ktv| 青青青国产精品视频| 久久夜色撩人精品国产av| 精品91自产拍在线| 精品无码免费专区毛片| 91精品国产色综合久久不| 久久久久久九九99精品 | 日韩亚洲AV无码一区二区不卡| 国产精品嫩草影院在线看| 国产精品乱码久久久久久软件| 国产精品视频一区麻豆| 久久久99精品成人片| 国产精品99久久久久久宅男小说| 琪琪精品视频在线观看| 窝窝午夜看片成人精品| 国产精品一国产AV麻豆 | 亚洲国产精品自在拍在线播放| 国产精品videossexohd| 亚洲av无码成人精品国产| 亚洲精品无码国产片| 免费看国产精品3a黄的视频| 国产精品扒开腿做爽爽的视频| 精品久久久无码人妻字幂| 日韩人妻高清精品专区| 国产精品亚洲精品日韩动图 | 国产偷国产偷精品高清尤物| 亚洲精品无码MV在线观看| 华人在线精品免费观看| 久久成人影院精品777| 精品视频在线免费观看| 久久久久久国产精品mv| 精品人无码一区二区三区| 国产精品久久久久久福利漫画| 亚洲日韩精品无码专区加勒比 | 精品露脸国产偷人在视频| 99在线热播精品免费99热|