OpenCloudOS 9使用yum安装nginx报错(All matches were filtered out by exclude filtering)

237 阅读1分钟

腾讯云服务器OpenCloudOS 9使用yum无法安装nginx

1. 报错

[root@VM-24-15-opencloudos yum.repos.d]# yum install nginx
Last metadata expiration check: 0:00:15 ago on Thu 31 Oct 2024 04:35:41 PM CST.
All matches were filtered out by exclude filtering for argument: nginx
Error: Unable to find a match: nginx

2. 解决方案

  • 原因:通常是因为 yum 的配置中存在一个 exclude 过滤器,阻止了 nginx 包的安装。

  • 解决方案:

    1. 检查 /etc/yum.conf 文件中的 exclude 设置
    cat /etc/yum.conf | grep exclude
    

    image.png

    1. 清理缓存并尝试安装
    sudo yum clean all 
    sudo yum makecache 
    sudo yum install nginx