Amazon Linux 2023 repository
·
方案一:重置系统自带repo:
# 1. 备份并清理现有 repo
sudo mv /etc/yum.repos.d/amzn2023.repo /etc/yum.repos.d/amzn2023.repo.bak
# 2. 重新生成官方 repo 文件(系统 release 包会提供)
sudo yum reinstall -y system-release --nogpgcheck
# 或者手动创建标准配置(复制上方内容)
# 3. 清理缓存并重新构建
sudo yum clean all
sudo yum makecache
方案二:手动添加最新版repo:
sudo tee /etc/yum.repos.d/amazonlinux.repo << 'EOF'
[amazonlinux]
name=Amazon Linux 2023 repository
mirrorlist=https://cdn.amazonlinux.com/al2023/core/mirrors/latest/x86_64/mirror.list
priority=10
enabled=1
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2023
enabled_metadata=1
[amazonlinux-debuginfo]
name=Amazon Linux 2023 repository - Debug
mirrorlist=https://cdn.amazonlinux.com/al2023/core/mirrors/latest/x86_64/debug/mirror.list
priority=10
enabled=0
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2023
[amazonlinux-source]
name=Amazon Linux 2023 repository - Source packages
mirrorlist=https://cdn.amazonlinux.com/al2023/core/mirrors/latest/x86_64/SRPMS/mirror.list
priority=10
enabled=0
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2023
EOF
# 3. 重建缓存并更新
sudo yum clean all
sudo yum makecache
sudo yum update -y
更多推荐
所有评论(0)