INFORMATICS

The Best

yum update centos 8 Errors

Звезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активнаЗвезда не активна
 

yum update centos 8 Errors during downloading metadata for repository 'appstream': - Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org] Błąd: Pobranie metadanych repozytorium „appstream” się nie powiodło: Cannot prepare internal mirrorlist: Curl error (6): Couldn't resolve host name for http://mirrorlist.centos.org/?release=8&arch=x86_64&repo=AppStream&infra=stock [Could not resolve host: mirrorlist.centos.org]

 

 

The error indicates that the system cannot resolve the hostname mirrorlist.centos.org, likely due to DNS issues or the fact that CentOS 8 has reached its End of Life (EOL) on December 31, 2021, and official mirrors are no longer maintained.

Steps to resolve the issue:

  1. Check DNS Configuration: Ensure your system can resolve domain names. Test by pinging a known address:
    bash
     
    ping google.com
     
     
    If it fails, check your DNS settings in /etc/resolv.conf. Add a public DNS server like Google’s:
    bash
     
    echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
     
     
  2. Switch to Vault Mirrors: Since CentOS 8 is EOL, the official mirrors are no longer available. You can switch to the CentOS Vault to access archived repositories. Update your repository configuration:
    bash
     
    sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*.repo
    sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
     
     
  3. Clear YUM Cache: Clear the cached metadata to ensure the system fetches new data:
    bash
     
    sudo yum clean all
    sudo rm -rf /var/cache/yum
     
     
  4. Update Again: Try running the update command again:
    bash
     
    sudo yum update
     
     
  5. Consider Migrating to a Supported Alternative: Since CentOS 8 is no longer supported, consider migrating to a supported distribution like CentOS Stream, AlmaLinux, or Rocky Linux to receive ongoing updates and security patches.

Odpowiedź po polsku:

Błąd wskazuje, że system nie może rozpoznać nazwy hosta mirrorlist.centos.org, co może wynikać z problemów z DNS lub faktu, że CentOS 8 osiągnął koniec wsparcia (EOL) 31 grudnia 2021 roku, a oficjalne mirrory nie są już utrzymywane.

Kroki do rozwiązania problemu:

  1. Sprawdź konfigurację DNS: Upewnij się, że system może rozpoznać nazwy domen. Przetestuj, pingując znany adres:
    bash
     
    ping google.com
     
     
    Jeśli się nie powiedzie, sprawdź ustawienia DNS w pliku /etc/resolv.conf. Dodaj publiczny serwer DNS, np. Google:
    bash
     
    echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
     
     
  2. Przełącz na mirrory Vault: Ponieważ CentOS 8 jest EOL, oficjalne mirrory nie są dostępne. Możesz przełączyć się na CentOS Vault, aby uzyskać dostęp do zarchiwizowanych repozytoriów:
    bash
     
    sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*.repo
    sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*.repo
     
     
  3. Wyczyść pamięć podręczną YUM: Wyczyść zcache'owane metadane, aby system pobrał nowe dane:
    bash
     
    sudo yum clean all
    sudo rm -rf /var/cache/yum
     
     
  4. Ponów aktualizację: Spróbuj ponownie uruchomić polecenie aktualizacji:
    bash
     
    sudo yum update
     
     
  5. Rozważ migrację na wspieraną alternatywę: Ponieważ CentOS 8 nie jest już wspierany, rozważ przejście na wspieraną dystrybucję, taką jak CentOS Stream, AlmaLinux lub Rocky Linux, aby otrzymywać aktualizacje i poprawki bezpieczeństwa.

Jeśli problem persists, podaj więcej szczegółów, np. wynik polecenia cat /etc/resolv.conf lub ping mirrorlist.centos.org.

Search