목차
반응형

수행 환경 : CentOS Linux release 7.6.1810 (Core)
오류 상황
yum install 시 발생한 오류
bash
닫기$ yum install -y libtool Loaded plugins: fastestmirror, langpacks Determining fastest mirrors base | 3.6 kB 00:00:00 http://mirror.centos.org/centos/7/sclo/x86_64/rh/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. One of the configured repositories failed (CentOS-7 - SCLo rh), 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=centos-sclo-rh ... 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 centos-sclo-rh or subscription-manager repos --disable=centos-sclo-rh 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=centos-sclo-rh.skip_if_unavailable=true failure: repodata/repomd.xml from centos-sclo-rh: [Errno 256] No more mirrors to try. http://mirror.centos.org/centos/7/sclo/x86_64/rh/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
문제 원인
CentOS7이 EOS (End of Service)
됨에 따라 정식 CentOS yum 레포지토리 사용이 불가능하다.
따라서 사용 가능한 미러사이트의 레포지토리로 경로를 다시 잡아 수정해야 한다.
해결 방법
이하는 2025년 3월 기준 CentOS7을 지원하는
kakao yum mirror site 및 vault mirror로 우회해
yum Base 및 SCL (Software Collections) 레포지토리를 설정하는 법에 대해 설명한다.
1. yum의 repository 설정 디렉터리로 이동한다.
bash
닫기$ cd /yum.repos.d
2. CentOS-Base.repo, CentOS-SCLo-scl-rh.repo, CEntOS-SCLo-scl.repo 파일을 수정해 준다.
CentOS-Base.repo
bash
닫기[base] name=CentOS-$releasever - Base baseurl=http://mirror.kakao.com/centos/$releasever/os/$basearch/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #released updates [updates] name=CentOS-$releasever - Updates # kakao baseurl=http://mirror.kakao.com/centos/$releasever/updates/$basearch gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://centos.mirror.cdnetworks.com/$releasever/extras/$basearch gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #additional packages that extend functionality of existing packages [centosplus] name=CentOS-$releasever - Plus baseurl=http://centos.mirror.cdnetworks.com/$releasever/centosplus/$basearch gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #contrib - packages by Centos Users [contrib] name=CentOS-$releasever - Contrib baseurl=http://centos.mirror.cdnetworks.com/$releasever/contrib/$basearch gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
BASE-repo 같은 경우에는 카카오 미러로 레포지토리 사이트를 변경한다.
SCL 관련은 vault.centos로 레포지토리 사이트를 변경한다.
CentOS-SCLo-scl.repo
bash
닫기[centos-sclo-sclo] name=CentOS-7 - SCLo sclo baseurl=http://vault.centos.org/centos/7/sclo/$basearch/sclo/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
SCLo.scl 파일 은 위의 부분만 수정한다.
CentOS-SCLo-scl-rh.repo
bash
닫기[centos-sclo-rh] name=CentOS-7 - SCLo rh baseurl=http://vault.centos.org/centos/7/sclo/$basearch/rh/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
SCLo-scl-rh.repo 파일 또한 위의 부분만 수정한다.
3. yum 관련 캐시 정보를 정리한다.
bash
닫기sudo yum clean all
yum clean all 실행 시 패키지 정보, 메타데이터, db 캐시 등 캐시 된 모든 파일을 삭제한다.
4. yum 관련 캐시를 재구성한다.
bash
닫기sudo yum makecache
5. yum 관련 미러사이트와 잘 연동되었는지 확인한다.
bash
닫기sudo yum repolist

반응형
'DEV > ETC' 카테고리의 다른 글
[트러블슈팅] (Windows, Oracle) 로컬 DB 외부 HOST IP 접속 허용 설정 (1) | 2024.06.19 |
---|---|
[트러블슈팅] (Windows) Tomcat 콘솔/로그 한글 깨짐 시 해결 방법 (0) | 2024.06.14 |
[트러블슈팅] (Windows) CMD 한글깨짐 발생 시 UTF-8 설정 방법 (0) | 2024.06.14 |