1)安装epel配置包
dnf install -y https://mirrors.aliyun.com/epel/epel-release-latest-8.noarch.rpm
2)替换为阿里云的地址
sed -i 's|^#baseurl=https://download.example/pub|baseurl=https://mirrors.aliyun.com|' /etc/yum.repos.d/epel*
sed -i 's|^metalink|#metalink|' /etc/yum.repos.d/epel*
3)清除缓存
dnf clean all
4) 建立缓存
dnf makecache
龙蜥AnolisOS8无法检索出epel的软件
dnf list all
没有看到epel网络源的软件包
解决方法需要启用epel源
dnf repolist all #列出所有的存储库
Repository epel is listed more than once in the configuration
仓库 id 仓库名称 状态
AppStream AnolisOS-8 - AppStream 启用
BaseOS AnolisOS-8 - BaseOS 启用
DDE AnolisOS-8 - DDE 禁用
Plus AnolisOS-8 - Plus 禁用
PowerTools AnolisOS-8 - PowerTools 启用
epel epel 禁用
dnf config-manager --set-enable epel #启用epel源
dnf repolist epel #查看epel源的状态
Repository epel is listed more than once in the configuration
仓库 id 仓库名称 状态
epel epel 启用