반응형
CentOS 8에서 Failed to download metadata for repo 'appstream' 오류를 해결하는 방법
오류
$ yum install telnet
Failed to set locale, defaulting to C.UTF-8
Repository appstream is listed more than once in the configuration
CentOS Linux 8 - AppStream 67 B/s | 38 B 00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
"Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist" 오류는 'appstream' 리포지토리의 내부 미러 목록에 URL이 없어서 메타데이터를 다운로드할 수 없는 경우에 발생합니다.
해결 방법
- sed 명령어를 사용하여 리포지토리를 수정합니다.
sed -i 's/^mirrorlist=/#mirrorlist=/g' /etc/yum.repos.d/CentOS-Linux-*.repo
sed -i -e 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*.repo
yum clean all
- editor(vim)를 사용하여 리포지토리를 수정합니다.
CentOS-Linux-AppStream.repo
vim /etc/yum.repos.d/CentOS-Linux-AppStream.repo
# CentOS-Linux-AppStream.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for CentOS updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[appstream]
name=CentOS Linux $releasever - AppStream
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
CentOS-Linux-BaseOS.repo
vim /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
# CentOS-Linux-BaseOS.repo
#
# The mirrorlist system uses the connecting IP address of the client and the
# update status of each mirror to pick current mirrors that are geographically
# close to the client. You should use this for CentOS updates unless you are
# manually picking other mirrors.
#
# If the mirrorlist does not work for you, you can try the commented out
# baseurl line instead.
[baseos]
name=CentOS Linux $releasever - BaseOS
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
telnet 패키지 설치
yum install -y telnet
$ yum install -y telnet
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:07:09 ago on Sun Jul 2 05:21:14 2023.
Dependencies resolved.
==================================================================================================================
Package Architecture Version Repository Size
==================================================================================================================
Installing:
telnet x86_64 1:0.17-76.el8 appstream 72 k
Transaction Summary
==================================================================================================================
Install 1 Package
Total download size: 72 k
Installed size: 119 k
Downloading Packages:
telnet-0.17-76.el8.x86_64.rpm 964 kB/s | 72 kB 00:00
------------------------------------------------------------------------------------------------------------------
Total 926 kB/s | 72 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : telnet-1:0.17-76.el8.x86_64 1/1
Running scriptlet: telnet-1:0.17-76.el8.x86_64 1/1
Verifying : telnet-1:0.17-76.el8.x86_64 1/1
Installed:
telnet-1:0.17-76.el8.x86_64
Complete!
참고URL
- CentOS Linux EOL : https://www.centos.org/centos-linux-eol/
728x90
반응형
'리눅스' 카테고리의 다른 글
docker inspect 명령어 (0) | 2023.07.04 |
---|---|
우분투에서 NTP 서버를 구성하는 방법 (0) | 2023.07.02 |
아파치 MPM Worker 모듈의 값을 계산 방법 (0) | 2023.06.30 |
우분투에서 figlet과 lolcat을 함께 사용하여 컬러풀한 텍스트 아트를 만드는 방법 (0) | 2023.06.29 |
리눅스 apachetop 명령어 (0) | 2023.06.29 |