I’m trying to install mod_proxy_html but it complains about wrong version installed…
[root@sillypoo conf]# yum install mod_proxy_html
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirror.symnds.com
Resolving Dependencies
--> Running transaction check
---> Package mod_proxy_html.x86_64 2:2.4.6-31.el7.centos.vm will be installed
--> Processing Dependency: httpd = 1:2.4.6-31.el7.centos.vm for package: 2:mod_proxy_html-2.4.6-31.el7.centos.vm.x86_64
--> Finished Dependency Resolution
Error: Package: 2:mod_proxy_html-2.4.6-31.el7.centos.vm.x86_64 (virtualmin)
Requires: httpd = 1:2.4.6-31.el7.centos.vm
Installed: 1:httpd-2.4.6-31.el7.centos.1.vm.x86_64 (@virtualmin)
httpd = 1:2.4.6-31.el7.centos.1.vm
Available: httpd-2.4.6-40.el7.centos.x86_64 (base)
httpd = 2.4.6-40.el7.centos
Available: 1:httpd-2.4.6-17.el7.centos.centos.1.vm.x86_64 (virtualmin)
httpd = 1:2.4.6-17.el7.centos.centos.1.vm
Available: 1:httpd-2.4.6-18.el7.centos.vm.x86_64 (virtualmin)
httpd = 1:2.4.6-18.el7.centos.vm
Available: 1:httpd-2.4.6-18.el7.centos.vm.1.x86_64 (virtualmin)
httpd = 1:2.4.6-18.el7.centos.vm.1
Available: 1:httpd-2.4.6-31.el7.centos.vm.x86_64 (virtualmin)
httpd = 1:2.4.6-31.el7.centos.vm
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
So why does virtualmin use httpd-2.4.6-31.el7.centos.1.vm.x86_64 when this package needs httpd-2.4.6-31.el7.centos.vm.x86_64? What is the purpose of the extra .1. in the name of package? Anything I should try?
You can update things this way (using -Uvh option in rpm instead of -ivh) but you do risk breaking things. How easy it is to recover depends on all that it touches but generally you’d have to erase and install older package again if it fails (might need to use force option).
It looks like human error on part of the package-builders, which does happen. I have yet to find a good solution for this type of dependency hell other than --nodeps at some point. If you examine the mod_proxy_html package with the command rpm -q --requires -p mod_proxy_html-2.4.6-31.el7.centos.vm.x86_64.rpm , you will notice it very specifically requires httpd-2.4.6-31.el7.centos.vm.
I usually use a two-step procedure that saves typing. We simply copy-and-paste the path that we get from the first command into the second command.
You can also build and install a little rpm that satisfies specific dependencies. This is not any different than using —nodeps, except that it lets you continue using yum in the normal way to add and remove packages, so it somewhat streamlines your life. Here’s an example spec file that you should definitely not use without editing, it’s just an example.