centos7 yum fastmirror를 사용할 수 없으면 어떻게 해야 합니까?

藏色散人
풀어 주다: 2020-05-06 15:18:40
앞으로
10148명이 탐색했습니다.

다음 칼럼에서는 centos 기본 튜토리얼에서 centos7 yum fastmirror를 사용할 수 없는 문제에 대한 해결책을 소개하겠습니다. 도움이 필요한 친구들에게 도움이 되길 바랍니다!

centos7 yum fastmirror를 사용할 수 없으면 어떻게 해야 합니까?

centos7 냠 가장 빠른 미러는 사용할 수 없습니다

[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"
로그인 후 복사

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

1단계:

[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
로그인 후 복사

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

2단계:

[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. 저장소의 업스트림에 문의하여 문제 해결을 요청하세요.

2. 작업 중인

업스트림을 가리키도록 저장소의 baseurl/etc를 재구성합니다. 이는 저장소(및

패키지)에서 지원하는 것보다 최신

배포 릴리스를 사용하는 경우 가장 유용합니다. 이전 배포 릴리스에서는 여전히 작동합니다.

3. 저장소를 일시적으로 비활성화한 상태에서 명령을 실행합니다

yum --disablerepo= ...

4. 저장소를 영구적으로 비활성화하므로 yum은 사용되지 않습니다. Yum

                                                                                는 구독을 영구적으로 활성화할 때까지 저장소를 무시합니다. Manager repos --disable=

5. 실패한 저장소를 사용할 수 없는 경우 건너뛰도록 구성합니다.

참고 yum은 대부분의 명령을 실행할 때 저장소에 접속하려고 시도하므로,

매번 시도하고 실패해야 합니다(따라서 yum은 많아질 것입니다

                                                                     ). =.skip_if_unavailable=true

불가 repo에 대한 유효한 기본 URL을 찾으세요: base/7/x86_64

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

원인: resolv.conf가 구성되지 않았습니다

해결책:

/etc 디렉터리에 resolv.conf를 구성하고 다음과 같은 네임서버 IP를 추가하세요.

[root@localhost ~]# vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
search localdomain
로그인 후 복사

명령을 저장하고 다시 실행하십시오.

더 많은 centos 기술 기사를 보려면

centos 튜토리얼


칼럼을 방문하세요!

위 내용은 centos7 yum fastmirror를 사용할 수 없으면 어떻게 해야 합니까?의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

관련 라벨:
원천:csdn.net
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!