728x90
목차
증상
sudo yum update
sudo yum install -y yum-utils
yum 커맨드 입력 시 아래와 같은 에러가 발생했다.
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#6 - "Could not resolve host: mirrorlist.centos.org; Name or service not known"
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
원인
2024년 7월 1일, CentOS 7은 수명이 다해서 CentOS 팀은 저장소를 vault.centos.org 보관소로 옮겼다.
저장소 URL을 업데이트하지 않으면 패키지를 업데이트하거나 검증할 수 없어 이러한 오류가 발생한다고 한다.
해결책
curl -fsSL https://autoinstall.plesk.com/PSA_18.0.62/examiners/repository_check.sh | bash -s -- update >/dev/null
위 커맨드를 입력해서 해결한다.
YUM package manager repositories were backed up to '/tmp/yum.repos.d-2024-09-23-PaYbcr' and switched from mirror.centos.org to vault.centos.org .
Repository local-base is listed more than once in the configuration
Repository local-Updates is listed more than once in the configuration
Repository local-extras is listed more than once in the configuration
Repository local-epel is listed more than once in the configuration
warning: /var/cache/yum/x86_64/7/base/packages/python-chardet-2.2.1-3.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Importing GPG key 0xF4A80EB5:
Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
Package : centos-release-7-9.2009.2.el7.centos.x86_64 (@local-Updates)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Repository local-base is listed more than once in the configuration
Repository local-Updates is listed more than once in the configuration
Repository local-extras is listed more than once in the configuration
Repository local-epel is listed more than once in the configuration
728x90
'최근 포스팅 TOP10' 카테고리의 다른 글
[머신러닝] 쿠버네티스에서 pytorch 모델 Triton서버를 활용해서 서빙하기(model.pt) (0) | 2024.10.02 |
---|---|
[도커] 로컬에 설치한 넥서스에 새로 빌드 후 이미지 push하기 (0) | 2024.09.23 |
[머신러닝] 쿠버네티스에서 TensorFlow 모델 Triton 서버를 활용해서 서빙하기(saved_model) (3) | 2024.09.23 |
[쿠버네티스] rook-ceph 에러 트러블 슈팅 과정 (0) | 2024.09.13 |
[kubernetes] docker, containerd 환경에서 Disk 크기 제어 방법 (0) | 2024.08.29 |