본문 바로가기

TroubleShooting/Linux

yum install Could not retrieve mirrorlist error was14: HTTPS Error 404 - Not Found

728x90

CentOS 7 에서 필요한 패키지를 yum 으로 잘 설치를 했었는데, 어느날 아래와 같은 에러가 발생했다.

# yum install expect
Loaded plugins: fastestmirror
base                                                                                                                      | 3.6 kB  00:00:00     
dell-omsa-indep                                                                                                           | 1.9 kB  00:00:00     
dell-omsa-specific                                                                                                        | 1.9 kB  00:00:00     
Could not retrieve mirrorlist http://linux.dell.com/repo/hardware/DSU_15.10.00/mirrors.cgi?osname=el7&basearch=x86_64&native=1 error was
14: HTTPS Error 404 - Not Found
http://linux.dell.com/repo/hardware/DSU_15.10.00/os_independent/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article 

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/

epel/x86_64/metalink                                                                                                      | 7.2 kB  00:00:00     
extras                                                                                                                    | 3.4 kB  00:00:00     
nginx                                                                                                                     | 2.9 kB  00:00:00     
updates                                                                                                                   | 3.4 kB  00:00:00     
Loading mirror speeds from cached hostfile


 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: dell-system-update_dependent/7/x86_64

메시지 중간에 있는 access.redhat.com/articles 링크는 레드햇 계정으로 로그인을 해야해서, 패스.

오류 메시지로 구글링을 해보니 비슷한 오류가 많이 보이는데, 나오는 해결 방법은 서버 주소로 ping 해보고 DNS 리졸빙이 안되는 거라서 구글의 DNS 서버 주소(8.8.8.8 또는 9.9.9.9) 를 /etc/resolv.conf 에 추가하라는 거였다.

 

실제로 문제가 된 linux.dell.com 으로 ping 테스트로 linux.dell.com 의 IP 주소는 나왔다. 서버는 살아있지만 http://linux.dell.com/repo/hardware/DSU_15.10.00/mirrors.cgi?osname=el7&basearch=x86_64&native=1 링크의 파일이 사라졌을거라고 예상이 된다.

# ping linux.dell.com
PING auspllistsapp01.us.dell.com (143.166.156.113) 56(84) bytes of data.

"yum repolist all" 명령어로 yum repository 주소를 확인해보니깐, 문제가 된 "dell-omsa-specific" 이 enable 이 되어 있다.

dell-system-update.repo 파일을 확인해보니깐, linux.dell.com URL 이 보인다.

"enabled=1" 을 0 으로 꺼면 될거 같지만, 그냥 사용안하기로 결정해서 dell-system-update.repo 파일을 rename 했다. (dell-system-update.repo.bak)

그리고나서 원하는 패키지를 다시 yum install 을 하니 정상적으로 동작한다.