กำลังพยายามอัปเดต CentOS Linux 8 stack ก่อนอัปเกรดเป็น Stream

CentOS Linux 8

[[email protected] yum.repos.d]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
[[email protected] yum.repos.d]# uname -r
4.18.0-147.5.1.el8_1.x86_64

แก้ไขสำหรับไม่สามารถดาวน์โหลดข้อมูลเมตาสำหรับ repo 'AppStream'

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-*

ข้อผิดพลาดระหว่างการดาวน์โหลดข้อมูลเมตาสำหรับที่เก็บ 'พิเศษ'

ยำ

yum clean all
yum update -y
yum check-update
yum update -y

หมายเหตุคำเตือนWarning: failed loading '/etc/yum.repos.d/CentOS-AppStream.repo', skipping.

Warning: failed loading '/etc/yum.repos.d/CentOS-AppStream.repo', skipping.
Repository extras is listed more than once in the configuration
CentOS-8 - Base 106 kB/s | 4.6 MB 00:44
CentOS-8 - Base 1.0 kB/s | 8.1 kB 00:08
Errors during downloading metadata for repository 'extras':
- Status code: 404 for https://vault.centos.org/centos/8/updates/x86_64/repodata/repomd.xml (IP: FILTERED)
Error: Failed to download metadata for repo 'extras': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

DNF

rm -rf /var/cache/dnf
dnf update --refresh
Warning: failed loading '/etc/yum.repos.d/CentOS-AppStream.repo', skipping.
Repository extras is listed more than once in the configuration
CentOS-8 - Base                                                                                                                               10 kB/s | 3.9 kB     00:00
CentOS-8 - Base                                                                                                                               23 kB/s | 8.1 kB     00:00
Errors during downloading metadata for repository 'extras':
  - Status code: 404 for https://vault.centos.org/centos/8/updates/x86_64/repodata/repomd.xml (IP: FILTERED)
Error: Failed to download metadata for repo 'extras': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

คำแนะนำใด ๆ เกี่ยวกับวิธีการวินิจฉัยและแก้ไขปัญหานี้?

answer

คำแนะนำในการเปลี่ยนจาก CentOS 8 เป็น Stream 8 ถูกฝังไว้ภายในไม่กี่คลิกบนหน้าดาวน์โหลด

# Converting from CentOS Linux 8 to CentOS Stream 8                               
dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
dnf distro-sync
                            

ธุรกรรมการอัปเกรดสามารถทำงานได้ในขณะที่ยังไม่อัปเดตโดยสมบูรณ์

อย่าเปิดใช้งาน vault ซึ่งใช้สำหรับเก็บถาวรเท่านั้น การติดตั้งทิ้งไว้จะส่งเสริมแนวทางปฏิบัติที่ไม่ดีของการใช้ซอฟต์แวร์ที่หมดอายุการใช้งาน

เห็นได้ชัดว่า repo พิเศษจะอยู่รอดได้ 8 และมีที่ที่ปล่อยแพ็คเกจสำหรับสตรีม (และ SIG)

แก้ไขปัญหาแล้ว

CentOS-Base.repo ถูก "เสียหาย"

เลอะ CentOS-Base.repo

[[email protected] yum.repos.d]# cat CentOS-Base.20220208.bak
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# 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, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[BaseOS]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#[BaseOS]
#name=CentOS-$releasever - Base
###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
[extras]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
#[base]
#name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
#baseurl=https://mirrors.kernel.org/centos/$releasever/os/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/os/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
#[updates]
#name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
#baseurl=https://mirrors.kernel.org/centos/$releasever/updates/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/updates/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
#[extras]
#name=CentOS-$releasever - Extras
baseurl=http://vault.centos.org/centos/$releasever/extras/$basearch/
#baseurl=https://mirrors.kernel.org/centos/$releasever/extras/$basearch/
#gpgcheck=1
#enabled=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#[base]
#name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch/
#baseurl=http://mirrors.kernel.org/centos/$releasever/os/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/os/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8
#released updates
#[updates]
#name=CentOS-$releasever - Updates
baseurl=http://vault.centos.org/centos/$releasever/updates/$basearch/
#baseurl=http://mirrors.kernel.org/centos/$releasever/updates/$basearch/
#baseurl=http://den2-fs1.polycomrp.net/centos/$releasever/updates/$basearch/
#proxy=_none_
#gpgcheck=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-8

เวอร์ชันแก้ไขด้วยตนเอง

[[email protected] yum.repos.d]# cat CentOS-Base.repo.rpmsave
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# 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, as a fall back you can try the
# remarked out baseurl= line instead.
#
[BaseOS]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
#baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
[extras]
name=CentOS-$releasever - Base
###mirrorlist=http://##mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
#baseurl=http://mirrors.kernel.org/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial