yum 업데이트가 작동하지 않습니다(yum에 캐시된 데이터가 부족하여 계속할 수 없음).

yum 업데이트가 작동하지 않습니다(yum에 캐시된 데이터가 부족하여 계속할 수 없음).

yum을 통해 centos 7에 항목을 성공적으로 설치했습니다. 그런 다음 epel repo( )를 설치했는데 yum install epel-release항상 다음과 같은 오류가 발생했고 그 후에는 아무것도 설치할 수 없었습니다.

 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

인터넷에서 많이 검색했지만 해결책을 찾지 못했습니다. 일부는 대리인으로부터 올 수도 있습니다. yum.conf에 프록시 정보를 추가했는데도 또 실패했습니다.

그런 다음 epel repo를 삭제하면 작동할 수 있는지 확인하고 시스템에서 epel-repo를 삭제한 후에 설치할 수 있습니다.

도와주세요. 이 문제를 해결하는데 이틀이 걸렸습니다.

답변1

발견한 대로 epel-release 패키지가 문제를 일으켰습니다. 아직 수행하지 않은 경우:

# yum remove epel-release

그런 다음 다음 명령을 사용하여 EPEL Repo를 설치합니다(wget 패키지 필요).

# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm
# rpm -ivh epel-release-7-9.noarch.rpm

그러면 문제 없이 yum 업데이트를 수행할 수 있습니다.

답변2

방금 새로운 CentOS 7.6을 사용하면서 이 문제가 발생했습니다.

해결책은 간단합니다.

  • 패키지를 제거하지 마십시오. epel-release(이미 제거한 경우 설치하십시오.)
  • 파일 편집/etc/yum.repos.d/epel.repo
  • 첫 번째 부분( [epel])에서:
    • 논평metalink=https://...
    • 주석 해제baseurl=http://...

이것은 나를 위해 문제를 해결했습니다.

답변3

/etc/resolv.conf내 경우처럼 저장소의 호스트를 알 수 있도록 DNS 서버를 추가해야 할 수도 있습니다 (Google DNS로 충분했습니다).

cat /etc/resolv.conf

# Generated by NetworkManager

nameserver 192.168.1.128 # local DNS

nameserver 8.8.8.8

nameserver 8.8.4.4

답변4

저도 이 문제에 직면했습니다. 이 문제의 근본 원인은 Docker 이미지를 빌드할 때 yum 저장소에 액세스할 수 없다는 것입니다. 그래서 kubernetes 프로젝트를 진행 중이기 때문에 kubernetes 클러스터의 네트워크 정책을 변경해야 합니다.

관련 정보