The lam-libs package update failed on RHEL4

When I used the up2date command to upgrade my RHEL system from RHEL4.6 to RHEL4.7, I got the following error message.


error: %preun(lam-libs-7.1.2-8.i386) scriptlet failed, exit status 2
There was a fatal RPM install error. The message was:
Failed running rpm transaction


The messages said "scriptlet failed", so I checked the scriptlet of the lam-libs package with the rpm command


# rpm -q --scripts lam-libs
postinstall scriptlet (using /bin/sh):
alternatives --install /etc/ld.so.conf.d/mpi32.conf \
mpilibs32 /usr/lib/lam/lam.ld.conf 5
/sbin/ldconfig
preuninstall scriptlet (using /bin/sh):
alternatives --remove mpilibs32 /usr/lib/lam/lam.ld.conf
postuninstall program: /sbin/ldconfig


As you can see the above result, the alternatives command was ran at the %preun section and it failed because the mpilibs32 entry was not found under the /etc/alternatives directory. That entry was removed by the lam-libs (7.1.2-15) package when the package was updated. Therefore if you want to update the lam-libs package, you should try the following:

Remove the old lam-libs package without executing the pre-/post-uninstall scripts, and update the package.

# rpm -e --noscript lam-libs-7.1.2-8
# /sbin/ldconfig
# rpm -Uvh lam-libs-7.1.2-15.el4.i386.rpm


Or

Create the mpilibs32 entry with the alternatives command, remove the old lam-lib package, and update the package.

# alternatives --install /etc/ld.so.conf.d/mpi32.conf mpilibs32 /usr/lib/lam/lam.ld.conf 5
# rpm -e lam-libs-7.1.2-8
# rpm -Uvh lam-libs-7.1.2-15.el4.i386.rpm

Good Bye, Folks!

As you may have heard, Fujitsu has completely discontinued Data Center Products and Solutions business in North America on April 1st, 2021. ...