CentOS Failed to synchronize cache for repo appstream
Получаем вот такую симпатичную ошибку
Failed to synchronize cache for repo 'baseos', ignoring this repo. Failed to synchronize cache for repo 'appstream', ignoring this repo
Основные причины:
- Некорректно установленное время
- Устаревший кеш dfn
- Некорректные CentOS baseURL
Смотрим время:
timedatectl # устанавливаем если неверное sudo timedatectl set-timezone "Europe/Moscow
Чистим кеш:
dnf clean all rm -rf /var/cache/dnf
Собственно основная причина:
CentOS Linux 8 had reached the End Of Life (EOL) on December 31st, 2021. It means that CentOS 8 will no longer receive development resources from the official CentOS project. After Dec 31st, 2021, if you need to update your CentOS, you need to change the mirrors to vault.centos.org where they will be archived permanently.
А фиксится так:
cd /etc/yum.repos.d/ sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* dnf update