[Linux] yum 실행 안될 때 cannot find a valid baseurl for repo

cannot find a valid baseurl for repo base/7/x86_64

 

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; 알 수 없는 오류"

 

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:

 

리눅스에서 yum으로 뭔가 설치하고자 할 때 위와 같은 오류가 발생할 수 있습니다. 여러 이유가 있을 수 있으나 일반적인 경우라면 yum repository를 변경해 주거나 네트워크를 재설정해줌으로서 문제를 해결할 수 있습니다.

 

원인

  1. 네트워크 오류
  2. 저장소(repository) 구성 파일 오류(base url 문제)

 

해결방법

네임서버 수정

vi /etc/resolv.conf

Public DNS server list

- KT olleh DNS 서버 주소 - 168.126.63.1

- SK Broadband 기본 DNS 서버 주소 - 210.220.163.82

- LG U+ DNS 서버 주소: 164.124.101.2

- Google Public DNS 서버 주소 - 8.8.8.8

 

ping 확인

 

IP자동 할당 dhclient

dhcp서버에서 IP를 자동으로 할당 받습니다.

 

위 방법으로 확인해 봐도 네트워크는 정상이고 해결이 되지 않는다면 아래의 글을 보고 레포지토리를 재설정해 보시는 것을 추천드립니다.

 

[IT/리눅스(Linux)] - 리눅스 레포지토리(repository) 추가해서 yum 사용하는 방법

 

리눅스 레포지토리(repository) 추가해서 yum 사용하는 방법

yum 명령어가 사용이 불가한 이유는 여러가지가 있습니다. 네트워크가 안정적이지 못하거나 yum 서비스가 없거나 yum이 사용할 repository가 제대로 설정되어 있지 않거나 하는 이유들 입니다. 그 중

coconuts.tistory.com

댓글

Designed by JB FACTORY