Have yum update to a specific version

Latest response

We have a RHEL 6.4 server running PHP 5.3.3. According to 'yum list available' 5.4 and 5.5 versions are out there.

Is there a way to use yum to update PHP to the latest 5.3 version without updating to 5.4 or 5.5?
I know there is a version lock, but am not sure it is applicable as we want to update the current version, just not upgrade to the next full revisions.

Thanks!

Responses

Yes. You need to specify the full RPM desired. Instead of just saying yum update php you'd have to do something more like yum install php-5.3.3-27.el6_5.

exactly what Tom said.

To see what is available:

yum --showduplicates list php

Yum ignores specific versoins and will always install the latest version available. Specifiying a particular version does NOT work, even when it is available, and there are no dependency issues.

Yum thinks it knows better than mere humans:

yum --showduplicates list xorg-x11-server-Xorg Loaded plugins: product-id, refresh-packagekit, security, subscription-manager, versionlock Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Available Packages
xorg-x11-server-Xorg.x86_64 1.7.7-26.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.7.7-26.el6_0.3 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.7.7-29.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.7.7-29.el6_1.2 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.10.4-6.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.10.4-6.el6_2.1 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.10.4-6.el6_2.3 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.10.6-1.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.13.0-11.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.13.0-11.1.el6_4.1 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.13.0-11.1.el6_4.2 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.13.0-23.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.13.0-23.1.el6_5 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.15.0-22.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.15.0-25.el6_6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.15.0-25.1.el6_6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.15.0-26.el6_6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.15.0-36.el6 rhel-6-workstation-rpms xorg-x11-server-Xorg.x86_64 1.17.4-9.el6 rhel-6-workstation-rpms [root@gslap-01 ~]#
[root@gslap-01 ~]# uname -a
Linux gslap-01 2.6.32-573.26.1.el6.x86_64 #1 SMP Tue Apr 12 01:47:01 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
[root@gslap-01 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Workstation release 6.7 (Santiago)
[root@gslap-01 ~]#
[root@gslap-01 ~]#
[root@gslap-01 ~]# yum install xorg-x11-server-Xorg-1.13.0-23.1.el6_5 xorg-x11-server-common-1.13.0-23.1.el6_5
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager, versionlock
Setting up Install Process
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-server-Xorg.x86_64 0:1.13.0-23.1.el6_5 will be installed
--> Processing Dependency: xorg-x11-drv-evdev >= 2.1.0-3 for package: xorg-x11-server-Xorg-1.13.0-23.1.el6_5.x86_64
--> Processing Dependency: xorg-x11-drv-void for package: xorg-x11-server-Xorg-1.13.0-23.1.el6_5.x86_64
--> Processing Dependency: xorg-x11-drv-vesa for package: xorg-x11-server-Xorg-1.13.0-23.1.el6_5.x86_64 ---> Package xorg-x11-server-common.x86_64 0:1.13.0-23.1.el6_5 will be installed --> Running transaction check ---> Package xorg-x11-drv-evdev.x86_64 0:2.9.2-1.el6 will be installed --> Processing Dependency: xserver-abi(xinput-21) >= 0 for package: xorg-x11-drv-evdev-2.9.2-1.el6.x86_64 --> Processing Dependency: libevdev.so.2(LIBEVDEV_1)(64bit) for package: xorg-x11-drv-evdev-2.9.2-1.el6.x86_64 --> Processing Dependency: libevdev for package: xorg-x11-drv-evdev-2.9.2-1.el6.x86_64 --> Processing Dependency: libevdev.so.2()(64bit) for package: xorg-x11-drv-evdev-2.9.2-1.el6.x86_64 ---> Package xorg-x11-drv-vesa.x86_64 0:2.3.4-1.el6 will be installed ---> Package xorg-x11-drv-void.x86_64 0:1.4.1-1.el6 will be installed --> Running transaction check ---> Package libevdev.x86_64 0:1.4.5-2.el6 will be installed ---> Package xorg-x11-server-Xorg.x86_64 0:1.13.0-23.1.el6_5 will be installed ---> Package xorg-x11-server-Xorg.x86_64 0:1.17.4-9.el6 will be installed --> Processing Dependency: xorg-x11-server-common >= 1.17.4-9.el6 for package: xorg-x11-server-Xorg-1.17.4-9.el6.x86_64 --> Processing Dependency: libxshmfence.so.1()(64bit) for package: xorg-x11-server-Xorg-1.17.4-9.el6.x86_64 --> Processing Dependency: libepoxy.so.0()(64bit) for package: xorg-x11-server-Xorg-1.17.4-9.el6.x86_64 --> Running transaction check ---> Package libepoxy.x86_64 0:1.2-3.el6 will be installed ---> Package libxshmfence.x86_64 0:1.2-1.el6 will be installed ---> Package xorg-x11-server-common.x86_64 0:1.13.0-23.1.el6_5 will be installed ---> Package xorg-x11-server-common.x86_64 0:1.17.4-9.el6 will be installed --> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================

Package Arch Version Repository Size

Installing for dependencies: libepoxy x86_64 1.2-3.el6 rhel-6-workstation-rpms 159 k libevdev x86_64 1.4.5-2.el6 rhel-6-workstation-rpms 32 k libxshmfence x86_64 1.2-1.el6 rhel-6-workstation-rpms 6.2 k xorg-x11-drv-evdev x86_64 2.9.2-1.el6 rhel-6-workstation-rpms 42 k xorg-x11-drv-vesa x86_64 2.3.4-1.el6 rhel-6-workstation-rpms 22 k xorg-x11-drv-void x86_64 1.4.1-1.el6 rhel-6-workstation-rpms 13 k xorg-x11-server-Xorg x86_64 1.17.4-9.el6 rhel-6-workstation-rpms 1.4 M xorg-x11-server-common x86_64 1.17.4-9.el6 rhel-6-workstation-rpms 50 k

Transaction Summary

Install 8 Package(s)

Total download size: 1.7 M Installed size: 4.9 M Is this ok [y/N]: n Exiting on user Command Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx-2016-06-01-02-04qekfvc.yumtx

As you can see, yum insists on installing the latest rpm - the 1.17, ignoring the 1.13 i have specified

This is wrong. Yum does allow you to install specific older versions if available in the repository as others stated.

I suspect what you saw occurred either because it picked a dependency that got the latest version which in turn required the latest versions of your original selections and/or you have something else already installed that doesn't allow you to downgrade one of the packages selected.

You might want to remove what this installed then go see what versions are available for the dependencies it chose.

Ben Bird is correct: yum fails to load the version being requested. You provide the seemingly correct explanation, from what I can tell: the package being updated requires what a more recent package provides and the more recent package requires a more recent version of the package being requested. Ie, yum's update process is fundamentally broken.

One could probably make the case that allowing an arbitrary version of a package to be installed without resolving its dependencies would be "fundamentally broken" (yes, you can do it, but you have to tell yum/rpm "please let me blow my own foot off with this howitzer").

Tom, if yum cannot satisfy the dependencies and the user's request, it should fail. What it does instead is neither, thereby bringing possible harm to the user. What yum seems to do is not resolve the dependencies of the target package, but arbitrarily and incorrectly update dependent packages, without need. The incorrectly updated packages in turn cause the target package to be updated past the desired version. For instance, the user says, wisely, "upgrade to php 5.3" and yum says "fuk you, here's 5.4". Why? Because php is dependent on php-common which several packages require, one of which is PHP itself. Yum determines that each of these dependencies should be updated. Why? idk. Yum then tries to update each of these packages to the latest version possible, regardless of what is actually needed to meet the target package requirements.

There seems to be almost no way to fix this, except to perhaps specify every single package with full version on which the target depends. This is a non-trivial challenge for a user.

Perhaps I was not accurate with "fundamentally broken". More apt is: "Dangerously broken" .

Again, "broken" is a matter of perspective. ALL software-design makes assumptions about how most people will want to use it most of the time. Flags and options allow you to override the defaults.

By design, RPMs (and yum as an overlay) make certain assumptions. If it didn't make these assumptions, you' have thousands of SA's whining, "why do I have to type out the full version number, platform and architecture (etc.) for everything I want to install???"

Each RPM (well, the RPM's author) governs to what degree RPMs seek other RPMs and associated versions. If I, as an RPM-maintainer, simply say that "this RPM needs python - I don't care which", heuristics kick in to find the most up to date RPM that matches the requesting host's configuration (if you want to see some of the "fill in the blanks" that the heuristics pull from, do python -c 'import yum, pprint; yb = yum.YumBase(); pprint.pprint(yb.conf.yumvar, width=1)'. As an RPM-maintainer I can remove some of filling-in-the-blanks that yum/rpm do by being more specific in my dependency-enumeration (though, in most cases, that ends up being floors rather than upper-bounds).

If you, as someone installing software, wants to constrain things, you have a couple choices: 1) Careful enumeration of all versions you wish to be present 2) Constrain what versions are available in the repos you're using. This is fairly trivially done via child-channels in Satellite, SpaceWalk, etc. If you don't have package management systems like those, you can always build a repo-cache that contains only the highest-versioned RPMs you feel are acceptable)

To 99.999% of the world (particularly to people that care about bugs and security flaws), the goal is to have the latest-available versions installed. Like most large-audience products and tools, yum/rpm implements the functionality that the vast majority desire as the default. For the 0.001% use-cases where a down-rev target is required, those needs can be addressed (see previous #1 & #2). The design-assumption is that if you want other than default behavior, you'll know all the details about how to get that target-behavior.

It worked for me:

yum check-update jenkins

Loaded plugins: fastestmirror, product-id, subscription-manager Loading mirror speeds from cached hostfile * epel: ftp.osuosl.org

jenkins.noarch 2.8-1.1 jenkins

yum update jenkins-2.7-1.1.noarch

rpm -q jenkins

jenkins-2.7-1.1.noarch

I have the same issue with Xorg that Ben Bird is running into, I tried providing every single dependency with the right version to the yum command but it insists on updating to the latest version.

Otherwise, you can pull all these packages and put them in local path and create local repo and then install using it, disable other repos. this may work out..

Thanks @Sadashiva, that is what I do in my test environment but when we deploy in production our customers only connect to the RHEL network (we deploy on premises) so I was hoping there could be a command line I could pass them to install the right version of Xorg that is compatible with the GPU drivers we use.

that is true David. In such circumstances, we could only leverage on download them locally and distribute across similar platforms.

Hi guys, I try to update from 6.6 to 6.7 with yum update --releasever=6.7 and it is producing errors about packages coming with 32 bit. The thing is that there are no 32bit installs on the system and if I try to install with skip-broken (I know it isn't a good idea) it gives a "multilib" error.

============= --> Finished Dependency Resolution Error: Package: rpm-python-4.8.0-47.el6.x86_64 (@rhel-6-server-eus-rpms) Requires: libmagic.so.1()(64bit) Removing: file-libs-5.04-21.el6.x86_64 (@rhel-6-server-eus-rpms/6Server) libmagic.so.1()(64bit) Updated By: file-libs-5.04-30.el6.i686 (rhel-6-server-rpms) Not found Available: file-libs-5.04-5.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-6.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-9.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-11.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-13.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-15.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Error: Package: rpm-libs-4.8.0-47.el6.x86_64 (@rhel-6-server-eus-rpms) Requires: libmagic.so.1()(64bit) Removing: file-libs-5.04-21.el6.x86_64 (@rhel-6-server-eus-rpms/6Server) libmagic.so.1()(64bit) Updated By: file-libs-5.04-30.el6.i686 (rhel-6-server-rpms) Not found Available: file-libs-5.04-5.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-6.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-9.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-11.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-13.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-15.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Error: Package: rpm-4.8.0-47.el6.x86_64 (@rhel-6-server-eus-rpms) Requires: libmagic.so.1()(64bit) Removing: file-libs-5.04-21.el6.x86_64 (@rhel-6-server-eus-rpms/6Server) libmagic.so.1()(64bit) Updated By: file-libs-5.04-30.el6.i686 (rhel-6-server-rpms) Not found Available: file-libs-5.04-5.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-6.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-9.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-11.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-13.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-15.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Error: Package: file-5.04-21.el6.x86_64 (@rhel-6-server-eus-rpms/6Server) Requires: file-libs = 5.04-21.el6 Removing: file-libs-5.04-21.el6.x86_64 (@rhel-6-server-eus-rpms/6Server) file-libs = 5.04-21.el6 Updated By: file-libs-5.04-30.el6.i686 (rhel-6-server-rpms) file-libs = 5.04-30.el6 Available: file-libs-5.04-5.el6.i686 (rhel-6-server-eus-rpms) file-libs = 5.04-5.el6 Available: file-libs-5.04-6.el6.i686 (rhel-6-server-eus-rpms) file-libs = 5.04-6.el6 Available: file-libs-5.04-9.el6.i686 (rhel-6-server-eus-rpms) file-libs = 5.04-9.el6 Available: file-libs-5.04-11.el6.i686 (rhel-6-server-eus-rpms) file-libs = 5.04-11.el6 Available: file-libs-5.04-13.el6.i686 (rhel-6-server-eus-rpms) file-libs = 5.04-13.el6 Available: file-libs-5.04-15.el6.i686 (rhel-6-server-eus-rpms) file-libs = 5.04-15.el6 Error: Package: file-5.04-21.el6.x86_64 (@rhel-6-server-eus-rpms/6Server) Requires: libmagic.so.1()(64bit) Removing: file-libs-5.04-21.el6.x86_64 (@rhel-6-server-eus-rpms/6Server) libmagic.so.1()(64bit) Updated By: file-libs-5.04-30.el6.i686 (rhel-6-server-rpms) Not found Available: file-libs-5.04-5.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-6.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-9.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-11.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-13.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) Available: file-libs-5.04-15.el6.x86_64 (rhel-6-server-eus-rpms) libmagic.so.1()(64bit) You could try using --skip-broken to work around the problem

You could try running: rpm -Va --nofiles --nodigest

if there are no 32 bit packages on the system then it should not point it over there.... disable 32 bit repos if available and test.

Hi I have added this and it still produces the same error.

check /etc/yum.conf file for settings and run yum in verbose mode 'yum -v' and then paste those outputs, let me check if i can help you. You may also consider logging a support case with Red Hat to get instant support...

hello, this is a pratical example: I want to install openjdk "1.7.0_85" below the steps:

yum --showduplicates list java-1.7.0-openjdk.x86_64

Loaded plugins: product-id, rhnplugin, search-disabled-repos, security, subscription-manager This system is receiving updates from RHN Classic or RHN Satellite. Available Packages java-1.7.0-openjdk.x86_64 1:1.7.0.3-2.1.el6.7 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.5-2.2.1.el6_3 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.5-2.2.1.el6_3.3 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.9-2.3.3.el6_3.1 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.9-2.3.3.2.el6_3 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.9-2.3.4.1.el6_3 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.9-2.3.5.3.el6_3 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.9-2.3.7.1.el6_3 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.9-2.3.8.0.el6_4 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.19-2.3.9.1.el6_4 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.25-2.3.10.3.el6_4 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.25-2.3.10.4.el6_4 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.45-2.4.3.2.el6_4 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.45-2.4.3.3.el6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.45-2.4.3.4.el6_5 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.51-2.4.4.1.el6_5 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.55-2.4.7.1.el6_5 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.65-2.5.1.2.el6_5 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.71-2.5.3.1.el6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.71-2.5.3.2.el6_6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.75-2.5.4.0.el6_6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.79-2.5.5.1.el6_6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.79-2.5.5.3.el6_6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.79-2.5.5.4.el6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.85-2.6.1.3.el6_6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.85-2.6.1.3.el6_7 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.91-2.6.2.2.el6_7 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.95-2.6.4.0.el6_7 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.99-2.6.5.0.el6_7 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.99-2.6.5.1.el6 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.101-2.6.6.1.el6_7 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.101-2.6.6.4.el6_8 rhel-x86_64-server-6 java-1.7.0-openjdk.x86_64 1:1.7.0.111-2.6.7.2.el6_8 rhel-x86_64-server-6

yum install java-1.7.0-openjdk-1.7.0.85-2.6.1.3.el6_6

java -version java version "1.7.0_85" OpenJDK Runtime Environment (rhel-2.6.1.3.el6_6-x86_64 u85-b01) OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)

yum update-to php-5.3.3-27.el6_5

man yum says : update-to This command works like "update" but always specifies the version of the package we want to update to.

The problem is then that future updates will force a version bump-up, which is undesirable. Worse, an update of a package which depends on php will force an update to php. The sure-fire way to do this is to

  1. In /etc/yum.conf, add a line
exclude=php-5*

If an exclude line already exists, simply append " php-5" to the end of the line. Alternatively, add a new line and add (with spaces/indent) "php-5" (Don't repeat "exclude=").

  1. When you want to actually update php, you can use:
yum --disableexcludes=all update-to php-5.3.3-31.el6_5 

Tom, soon after your reply, I discovered yum was de facto EOLd (and for whatever reason, no longer maintained) in favor of 'dnl'.

You general comments were valid, but the last one I took issue with: "To 99.999% of the world (particularly to people that care about bugs and security flaws), the goal is to have the latest-available versions installed. Like most large-audience products and tools, yum/rpm implements the functionality that the vast majority desire as the default."

soapbox

The fact that 99.999% of the world are absurdly stupid does not mean software should retain such flaws as to prevent the smart ones from using it correctly. The goal "to have the latest-available versions installed" is fundamentally stupid and reflects an overly optimistic view of the software cycle. Now, if you were to say "to have the latest stable version installed", I would agree, but yum does not (unlike apt) provide a universal way of distinguishing between "stable" and simply "latest". Even if the vast majority of users may not care about stability, the minority care A LOT, and that requirement should trump the rule-by-majority. (I say "should" based on economic preferences.)

The only (TBI) way to distinguish between 'latest' and 'stable' is to include the major version in the package-name component, thus "zabbix22" and "postgresql94". This is an absurd work-around necessitated by the stupid community and lack of functionality in yum.

/soapbox

Please uninstall all multiple version package and do yum update. Success for me below steps

rpm -e php-cli --nodeps rpm -e php-common --nodeps

yum update -y