5

I have a CentOS 7 VM with Nginx installed. I use Webmin to administer the server.

It normally installs updates automatically, but the nginx update failed so I tried to manually do the update. It returns this:

Installing package(s) with command /bin/yum -y install nginx ..
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.netsite.dk
 * epel: mirror.netsite.dk
 * extras: mirror.netsite.dk
 * updates: mirror.netsite.dk
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 1:1.20.1-9.el7 will be updated
--> Processing Dependency: nginx(abi) = 1.20.1 for package: 1:nginx-mod-mail-1.20.1-9.el7.x86_64
--> Processing Dependency: nginx(abi) = 1.20.1 for package: 1:nginx-mod-stream-1.20.1-9.el7.x86_64
--> Processing Dependency: nginx(abi) = 1.20.1 for package: 1:nginx-mod-http-perl-1.20.1-9.el7.x86_64
--> Processing Dependency: nginx(abi) = 1.20.1 for package: 1:nginx-mod-http-image-filter-1.20.1-9.el7.x86_64
--> Processing Dependency: nginx(abi) = 1.20.1 for package: 1:nginx-mod-http-xslt-filter-1.20.1-9.el7.x86_64
---> Package nginx.x86_64 1:1.20.2-1.el7.ngx will be an update
--> Finished Dependency Resolution
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
.. install failed!

I have tried to run the rpm command suggested - and then redo the package update. But that made no difference.

I also tried to install the 19 other packages - they all installed correctly. Then I retried Nginx - but it still fails with the same error... I have also tried to disable the nginx repo and the epel repo in turn (in case it was a clash between the two repos) - but it made no difference.

Does anyone know what caused this issue - and how to fix it?

Thanks in advance!

/John

Paul
  • 2,755
  • 6
  • 24
  • 35
John Dalsgaard
  • 193
  • 1
  • 8
  • It looks to me like the new packages can't be found on the repository server. Did you check that the mirror is still valid? – wazoox Dec 09 '21 at 21:58
  • I'm having the same issue, and it looks like the same scenario (CentOS 7, EPEL, Nginx repo, same packages are 'Not found'). – geerlingguy Dec 13 '21 at 17:39
  • I'm having the same issue, with the same setup (CentOS 7, EPEL, nginx repo). My errors are identical. Our C7 servers stopped being able to upgrade on Nov 16, which is [when the nginx repo added 1.20.2](http://nginx.org/packages/centos/7/x86_64/RPMS/). The errors suggest (to me, at least) that `yum update` is attempting to update nginx to 1.20.2, but the EPEL-provided nginx packages (e.g. [nginx-mod-mail](https://centos.pkgs.org/7/epel-x86_64/nginx-mod-mail-1.20.1-9.el7.x86_64.rpm.html)) have an nginx requirement of 1.20.1 (see "Requires"), and so the dependencies can't be resolved. – joel boonstra Dec 17 '21 at 14:55

1 Answers1

5

I've solved this for my system, though my solution may not be applicable to everyone, depending on whether or not you use the nginx-* modules that are causing the dependency issues.


My solution was to remove nginx-mod-http-perl, nginx-mod-stream, nginx-mod-mail, nginx-mod-http-image-filter, and nginx-mod-http-xslt-filter, and I was then able to yum upgrade to get the latest nginx version.

Edited to add: In addition to removing those packages, I updated /etc/yum.repos.d/epel.repo to have exclude=nginx*, to prevent @epel-provided nginx packages from being reinstalled.

This worked for me because I don't actually use the functionality provided by those packages; I have a hunch they are installed by Webmin (which, like the OP, I'm also using) to support some of the features that it can provide.

If you are using functionality these modules provide, then I think the solution, at least for now, is to disable the nginx repo, and re-enable it if/when @epel releases compatible modules. If you do this, you will not have any nginx upgrades available, since there's no 1.20.2 available on @epel.


The core problem seems to be that you (and I) have nginx-1.20.1-9.el7.x86_64 (@epel) installed, but both @epel and nginx repos enabled.

On/around Nov 16, the nginx repo released nginx-1.20.2, and so yum is now trying to update to that version. However, there are no corresponding 1.20.2 updates for the various nginx-* modules installed (either on @epel or on nginx) and so they couldn't be udpated. Those modules also require nginx(abi) = 1.20.1, which is the one that @epel provides (but that nginx does not appear to provide) and so the dependency check failed.

Sidenote: in our case, we did have the nginx-provided core package installed at one point in time, and it was replaced at some point with the @epel version - this is from yum logs:

# zgrep -h nginx.x86 /var/log/yum.log-202* /var/log/yum.log
Apr 22 03:55:37 Updated: nginx.x86_64 1:1.18.0-1.el7.ngx
Oct 30 09:27:11 Updated: nginx.x86_64 1:1.18.0-2.el7.ngx
Apr 21 08:48:33 Updated: nginx.x86_64 1:1.20.0-1.el7.ngx
May 26 04:20:28 Updated: nginx.x86_64 1:1.20.1-1.el7.ngx
Jun 18 06:46:31 Installed: nginx.x86_64 1:1.20.1-2.el7
Oct 27 04:51:03 Updated: nginx.x86_64 1:1.20.1-9.el7

On June 18 the .ngx package was replaced with the one provided by @epel. This may or may not be relevant to the problem at hand.

  • Hi @joel - thanks for your update. I tried to uninstall those modules as well (had to ignore dependencies) - and then the update succeeded. – John Dalsgaard Dec 18 '21 at 16:48
  • I just went through the same process outlined here. Thanks! I added "exclude=nginx*" to my EPEL repo and removed nginx. After that I removed nginx using 'yum remove nginx' which removed my modules as well. I was able to find some of the modules I was using in the main nginx repo (https://centos.pkgs.org/7/nginx-x86_64/) but a few aren't there. Now I'm missing "nginx-mod-mail" and "nginx-mod-stream". The new format is "nginx-module-{module name}" by the way. Also, remember your old nginx config is saved as /etc/nginx/nginx.conf.rpmsave – red_shift Jan 05 '22 at 20:21