yum update排除指定包

今天更新系统时报错:


Error: Package: 1:nginx-mod-http-perl-1.20.1-9.el7.x86_64 (@epel)
           Requires: nginx(abi) = 1.20.1
           Removing: 1:nginx-1.20.1-9.el7.x86_64 (@epel)
               nginx(abi) = 1.20.1
           Updated By: 1:nginx-1.20.2-1.el7.ngx.x86_64 (nginx)
               Not found
Error: Package: 1:nginx-mod-stream-1.20.1-9.el7.x86_64 (@epel)
           Requires: nginx(abi) = 1.20.1
           Removing: 1:nginx-1.20.1-9.el7.x86_64 (@epel)
               nginx(abi) = 1.20.1
           Updated By: 1:nginx-1.20.2-1.el7.ngx.x86_64 (nginx)
               Not found
Error: Package: 1:nginx-mod-mail-1.20.1-9.el7.x86_64 (@epel)
           Requires: nginx(abi) = 1.20.1
           Removing: 1:nginx-1.20.1-9.el7.x86_64 (@epel)
               nginx(abi) = 1.20.1
           Updated By: 1:nginx-1.20.2-1.el7.ngx.x86_64 (nginx)
               Not found
Error: Package: 1:nginx-mod-http-image-filter-1.20.1-9.el7.x86_64 (@epel)
           Requires: nginx(abi) = 1.20.1
           Removing: 1:nginx-1.20.1-9.el7.x86_64 (@epel)
               nginx(abi) = 1.20.1
           Updated By: 1:nginx-1.20.2-1.el7.ngx.x86_64 (nginx)
               Not found
Error: Package: 1:nginx-mod-http-xslt-filter-1.20.1-9.el7.x86_64 (@epel)
           Requires: nginx(abi) = 1.20.1
           Removing: 1:nginx-1.20.1-9.el7.x86_64 (@epel)
               nginx(abi) = 1.20.1
           Updated By: 1:nginx-1.20.2-1.el7.ngx.x86_64 (nginx)
               Not found
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

感觉是epel源和nginx源有冲突,所以可以更新时先排除nginx这个软件包

yum update -x {package-name}