- Today
- Total
Notice
Recent Posts
Recent Comments
Link
250x250
프로그래밍 농장
[Linux] CentOS7 yum 커맨드 사용 에러 본문
728x90
리눅스로 apache 웹서버를 하나 띄우려하는데 sudo yum install httpd 에서 아래와 같은 에러가 발생했다.
sudo yum update
sudo yum install -y yum-utils
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 configuration728x90
'Devops' 카테고리의 다른 글
| [devops] n8n 자동화툴 R&D 참고용 (0) | 2025.08.06 |
|---|---|
| Trello 웹후커 등록하는법 (0) | 2025.08.04 |
| [Perforce] Workspace 변경 시, "Path 'd:\workspace\trunk\KR_Server\...' is not underclient's root 'D:\workspace\trunk\KR_Client'." 에러 해결방법 (1) | 2025.06.24 |
| [SVN] svn: database disk image is malformed 이슈 해결 (0) | 2025.06.20 |
| jenkins pipeline post status 관련 내용 (0) | 2025.06.04 |