Conflicting HTTPD and HTTPD24 files when running yum update prevents update

ConstantFun asked:

Similar conflict issues

The files that are experiencing conflict issues are almost all the same as the ones in the link above. However, I am not trying to install php56w…etc like the person who posted the question in the link, I am just trying to yum update.

I want to know how to resolve the conflicts to complete my yum update.

Transaction Summary
===============================================================================================================================================================================================================================================================================================================================
Install      31 Package(s)
Upgrade     334 Package(s)

Total size: 282 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
  file /opt/rh/httpd24/root/etc/httpd/conf.d/README conflicts between attempted installs of httpd24-httpd-2.4.34-18.el6.x86_64 and httpd-2.2.15-69.el6.centos.x86_64
  file /opt/rh/httpd24/root/etc/httpd/conf/magic conflicts between attempted installs of httpd24-httpd-2.4.34-18.el6.x86_64 and httpd-2.2.15-69.el6.centos.x86_64
  file /opt/rh/httpd24/root/etc/httpd/logs conflicts between attempted installs of httpd24-httpd-2.4.34-18.el6.x86_64 and httpd-2.2.15-69.el6.centos.x86_64
  file /opt/rh/httpd24/root/etc/httpd/modules conflicts between attempted installs of httpd24-httpd-2.4.34-18.el6.x86_64 and httpd-2.2.15-69.el6.centos.x86_64
  file /opt/rh/httpd24/root/etc/httpd/run conflicts between attempted installs of httpd24-httpd-2.4.34-18.el6.x86_64 and httpd-2.2.15-69.el6.centos.x86_64

Error Summary

(Background):

Originally, httpd was installed and due to security reasons httpd24 was installed at a later date. (I was not around during the time of the original installations). Currently, I do not know the reason behind the conflicts.

yum was also being blocked before this happened by a broken repo. I tried using the argument --disablerepo=<nameofrepo> to fix this but for some reason, it didn’t work and I directly disabled it in the repo by changing enable=1 to enable=0.
It was recommended here.


I wanted to learn more and found this article but it is subscriber-read-only by RH.

Is the only way to go about fixing this deleting or replacing the files as mentioned here?

Albeit the first answer’s first few lines state:

Replacing files from another RPM package is bad idea in most cases and
I strongly advise against what you’re trying to do. That said, apply
following at your own risk.

If possible, I want to resolve the conflicts rather than use a destructive method.

My answer:


Well, I do have access to that subscriber-only article, and the solution it gives is pretty non-obvious.

The problem described there is that at some point /etc/httpd was made a symbolic link to /opt/rh/httpd24/root/etc/httpd. This causes the old httpd package, which stores its configuration in /etc/httpd, to instead try to overwrite the files created by the newer package.

To verify that this is your problem, see if /etc/httpd is a symbolic link:

[[email protected] ~]# ls -ld /etc/httpd

The solution is simply to remove the symlink.

[[email protected] ~]# rm -f /etc/httpd

NB: Your system goes out of support in less than two months. You should be upgrading to a current distribution (e.g. CentOS 8) as soon as possible.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.