Operation System/Unix & Linux
CentOS 8, yum 오류 Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
- -
728x90
반응형
CentOS 8 버전에서 yum 수행 시 발생하는 오류
[root@localhost ~]# yum install -y lsof net-tools openssh-server
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - AppStream 56 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
문제
- CentOS 8버전부터는 미러 사이트 변경 됨
- yum 유틸리티에서 바라보는 mirrorlist 값에 해당하는 주소에 패키지가 없어짐
- http://mirror.centos.org/ 에서 https://vault.centos.org/ 변경 필요
- miiror.centos.org에는 readme 파일만 존재하고 vault.centos.org 이용해야함
- readme 파일 내용을 확인해보면 8이상부터 더 이상 사용되지 않는 미러 사이트 입니다.
This directory (and version of CentOS) is deprecated. For normal users,
you should use /8/ and not /8.4.2105/ in your path. Please see this FAQ
concerning the CentOS release scheme:
https://wiki.centos.org/FAQ/General
If you know what you are doing, and absolutely want to remain at the 8.4.2105
level, go to http://vault.centos.org/ for packages.
Please keep in mind that 8.4.2105 no longer gets any updates, nor
any security fix's.
해결
- mirrorlist 변경 또는 baseurl 변경
sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
[root@e44c1b786b32 yum.repos.d]# yum install -y lsof
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - AppStream 50 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
[root@e44c1b786b32 yum.repos.d]# sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
[root@e44c1b786b32 yum.repos.d]# sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
[root@e44c1b786b32 yum.repos.d]# yum install -y lsof
Failed to set locale, defaulting to C.UTF-8
CentOS Linux 8 - AppStream 5.4 MB/s | 8.4 MB 00:01
CentOS Linux 8 - BaseOS 5.2 MB/s | 4.6 MB 00:00
CentOS Linux 8 - Extras 18 kB/s | 10 kB 00:00
Dependencies resolved.
==================================================================================================================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================================================================================================================
Installing:
lsof x86_64 4.93.2-1.el8 baseos 253 k
Transaction Summary
==================================================================================================================================================================================================================
Install 1 Package
Total download size: 253 k
Installed size: 623 k
Downloading Packages:
lsof-4.93.2-1.el8.x86_64.rpm 452 kB/s | 253 kB 00:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 450 kB/s | 253 kB 00:00
warning: /var/cache/dnf/baseos-398269605bdca3dc/packages/lsof-4.93.2-1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
CentOS Linux 8 - BaseOS 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x8483C65D:
Userid : "CentOS (CentOS Official Signing Key) <security@centos.org>"
Fingerprint: 99DB 70FA E1D7 CE22 7FB6 4882 05B5 55B3 8483 C65D
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : lsof-4.93.2-1.el8.x86_64 1/1
Running scriptlet: lsof-4.93.2-1.el8.x86_64 1/1
Verifying : lsof-4.93.2-1.el8.x86_64 1/1
Installed:
lsof-4.93.2-1.el8.x86_64
Complete!
728x90
반응형
'Operation System > Unix & Linux' 카테고리의 다른 글
Linxu 환경에서 EOF 중첩으로 사용하기 (0) | 2024.03.20 |
---|---|
pmap을 통한 프로세스 메모리 덤프 (0) | 2024.03.07 |
passwd: command not found (0) | 2024.01.09 |
sshpass: command not found (0) | 2023.08.10 |
리눅스(Linux)의 CPU loadaverage 분석 (0) | 2023.08.09 |
소중한 공감 감사합니다