저장소에 대한 유효한 기본 URL을 찾을 수 없습니다: 기본 문제

저장소에 대한 유효한 기본 URL을 찾을 수 없습니다: 기본 문제

yum을 업데이트하려고 하는데 성공하지 못했습니다. 기존 솔루션을 모두 시도했지만 해결할 수 없습니다. 이 오류가 발생합니다.

[root@localhost]# yum update 로드된 플러그인: fastmirror, langpacks 캐시된 호스트 파일의 미러 로딩 속도로 인해 미러 목록을 검색할 수 없습니다.http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock오류는 14입니다. 컬#7 - "2001:1b48:203::4:10에 연결할 수 없습니다: 네트워크에 연결할 수 없습니다."

 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

처음에 이렇게 했는데 같은 오류가 발생했습니다.

[root@localhost ]# ONBOOT=no
[root@localhost ]# dhclient
[root@localhost ]# yum update

그런 다음 /etc/yum.repos.d/로 이동했습니다.

vi CentOS-Base.repo

그런 다음 baseurl 앞의 #을 제거하고 :x를 통해 저장하고 입력했습니다.

이제 다음과 같은 오류가 발생합니다

[root@localhost yum.repos.d]# yum update
Loaded plugins: fastestmirror, langpacks
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#7 - "Failed to connect to 2001:1b48:203::4:10: Network is unreachable"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was
14: curl#7 - "Failed to connect to 2001:1b48:203::4:10: Network is unreachable"
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=updates&infra=stock error was
14: curl#7 - "Failed to connect to 2001:1b48:203::4:10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
Trying other mirror.


 One of the configured repositories failed (CentOS-7 - Base),
 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=base ...

     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 base
        or
            subscription-manager repos --disable=base

     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=base.skip_if_unavailable=true

failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed to connect to 2607:f2d8:1:e::10: Network is unreachable"

다음 명령도 사용했지만 오류는 동일합니다

yum clean all && yum clean metadata && yum clean dbcache && yum makecache && yum update -y

관심을 확인하기 위해 다음을 수행했습니다.

[

root@localhost ~]# cat /etc/resolv.conf
; generated by /usr/sbin/dhclient-script
search dhcp.swmed.org
nameserver 199.242.236.1
nameserver 199.242.237.1

그런 다음 첫 번째 메시지를 핑하고 다음 메시지를 받았습니다.

[root@localhost ~]# ping 199.242.236.1
PING 199.242.236.1 (199.242.236.1) 56(84) bytes of data.
64 bytes from 199.242.236.1: icmp_seq=1 ttl=61 time=0.262 ms
64 bytes from 199.242.236.1: icmp_seq=2 ttl=61 time=0.315 ms
64 bytes from 199.242.236.1: icmp_seq=3 ttl=61 time=0.299 ms
64 bytes from 199.242.236.1: icmp_seq=4 ttl=61 time=0.351 ms

/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
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0

답변1

다음과 같이 /etc/yum.conf에 프록시 정보를 설정합니다.

proxy=http://xxx.xxx.xxx.xxx:1087
proxy_username=
proxy_password=

답변2

CentOS 7.5에서 동일한 문제에 직면하고 있으며 모든 디버깅을 수행한 후 하드웨어 방화벽이 Yum URL을 차단하고 있음을 발견했습니다.

방화벽에서 URL을 허용한 후 문제가 해결되었습니다.

관련 정보