Workload Automation

How to automatically install the 32 bit version of any Linux RedHat package? 

03-01-2016 04:12 AM

An easy way to install the 32 and 64 bit version of any Linux RedHat package is to amend file  /etc/yum.conf  with below line:


          -       multilib_policy=all

Then run:

-       yum install <package>

 

The 32 and 64 bit versions of this <package> will be automatically installed

 

A typical /etc/yum.conf file might be:

[main]

cachedir=/var/cache/yum

keepcache=0

debuglevel=2

logfile=/var/log/yum.log

distroverpkg=redhat-release

tolerant=1

exactarch=1

obsoletes=1

gpgcheck=1

plugins=1

# Note: yum-RHN-plugin doesn't honor this.

metadata_expire=1h

# Default.

# installonly_limit = 3

multilib_policy=all

# PUT YOUR REPOS HERE OR IN separate files named file.repo

# in /etc/yum.repos.d

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Comments

05-30-2017 09:11 PM

Adding multilib_policy=all to the yum.conf will work when the 32bit package version in the yum repository is same as the existing 64bit package. In case the 32bit package is newer than its existing 64bit counterpart, then yum will throw the "Protected multilib versions:..." error. In this case, one needs to update the existing 64bit package first and then install the 32bit counterpart.

 

How to know what versions are installed and what updates are available? Execute the command:

# yum list <package>

For example:

# yum install libuuid.i686
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * extras: mirror.fibergrid.in
 * updates: mirror.fibergrid.in
Resolving Dependencies
--> Running transaction check
---> Package libuuid.i686 0:2.23.2-33.el7_3.2 will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.4) for package: libuuid-2.23.2-33.el7_3.2.i686
--> Processing Dependency: ld-linux.so.2(GLIBC_2.3) for package: libuuid-2.23.2-33.el7_3.2.i686
--> Processing Dependency: ld-linux.so.2 for package: libuuid-2.23.2-33.el7_3.2.i686
--> Running transaction check
---> Package glibc.i686 0:2.17-157.el7_3.2 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-157.el7_3.2.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-157.el7_3.2.i686
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.16.2.3-14.4.el7 will be installed
--> Finished Dependency Resolution
Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:

 

         1. You have an upgrade for libuuid which is missing some
            dependency that another package requires. Yum is trying to
            solve this by installing an older version of libuuid of the
            different architecture. If you exclude the bad architecture
            yum will tell you what the root cause is (which package
            requires what). You can try redoing the upgrade with
            --exclude libuuid.otherarch ... this should give you an error
            message showing the root cause of the problem.

 

         2. You have multiple architectures of libuuid installed, but
            yum can only see an upgrade for one of those architectures.
            If you don't want/need both architectures anymore then you
            can remove the one with the missing update and everything
            will work.

 

         3. You have duplicate versions of libuuid installed already.
            You can use "yum check" to get yum show these errors.

 

       ...you can also use --setopt=protected_multilib=false to remove
       this checking, however this is almost never the correct thing to
       do as something else is very likely to go wrong (often causing
       much more problems).

 

       Protected multilib versions: libuuid-2.23.2-33.el7_3.2.i686 != libuuid-2.23.2-33.el7.x86_64

# yum list libuuid
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * extras: mirror.fibergrid.in
 * updates: mirror.fibergrid.in
Installed Packages
libuuid.x86_64                                                                  2.23.2-33.el7                                                                      @anaconda
Available Packages
libuuid.i686                                                                    2.23.2-33.el7_3.2                                                                  updates
libuuid.x86_64                                                                  2.23.2-33.el7_3.2                                                                  updates

# yum update libuuid
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * extras: mirror.fibergrid.in
 * updates: mirror.fibergrid.in
Resolving Dependencies
--> Running transaction check
---> Package libuuid.x86_64 0:2.23.2-33.el7 will be updated
--> Processing Dependency: libuuid = 2.23.2-33.el7 for package: libblkid-2.23.2-33.el7.x86_64
--> Processing Dependency: libuuid = 2.23.2-33.el7 for package: libmount-2.23.2-33.el7.x86_64
--> Processing Dependency: libuuid = 2.23.2-33.el7 for package: util-linux-2.23.2-33.el7.x86_64
---> Package libuuid.x86_64 0:2.23.2-33.el7_3.2 will be an update
--> Running transaction check
---> Package libblkid.x86_64 0:2.23.2-33.el7 will be updated
---> Package libblkid.x86_64 0:2.23.2-33.el7_3.2 will be an update
---> Package libmount.x86_64 0:2.23.2-33.el7 will be updated
---> Package libmount.x86_64 0:2.23.2-33.el7_3.2 will be an update
---> Package util-linux.x86_64 0:2.23.2-33.el7 will be updated
---> Package util-linux.x86_64 0:2.23.2-33.el7_3.2 will be an update
--> Finished Dependency Resolution

 

Dependencies Resolved

 

============================================================================================================================================================================
 Package                                  Arch                                 Version                                          Repository                             Size
============================================================================================================================================================================
Updating:
 libuuid                                  x86_64                               2.23.2-33.el7_3.2                                updates                                76 k
Updating for dependencies:
 libblkid                                 x86_64                               2.23.2-33.el7_3.2                                updates                               170 k
 libmount                                 x86_64                               2.23.2-33.el7_3.2                                updates                               172 k
 util-linux                               x86_64                               2.23.2-33.el7_3.2                                updates                               1.9 M

 

Transaction Summary
============================================================================================================================================================================
Upgrade  1 Package (+3 Dependent packages)

 

Total download size: 2.3 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs reduced 2.3 M of updates to 1.0 M (55% saved)
(1/4): libmount-2.23.2-33.el7_2.23.2-33.el7_3.2.x86_64.drpm                                                                                          |  82 kB  00:00:00
(2/4): libblkid-2.23.2-33.el7_2.23.2-33.el7_3.2.x86_64.drpm                                                                                          |  69 kB  00:00:00
(3/4): libuuid-2.23.2-33.el7_3.2.x86_64.rpm                                                                                                          |  76 kB  00:00:00
(4/4): util-linux-2.23.2-33.el7_2.23.2-33.el7_3.2.x86_64.drpm                                                                                        | 880 kB  00:00:00
Finishing delta rebuilds of 1 package(s) (1.9 M)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                       294 kB/s | 1.1 MB  00:00:03
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : libuuid-2.23.2-33.el7_3.2.x86_64                                                                                                                         1/8
  Updating   : libblkid-2.23.2-33.el7_3.2.x86_64                                                                                                                        2/8
  Updating   : libmount-2.23.2-33.el7_3.2.x86_64                                                                                                                        3/8
  Updating   : util-linux-2.23.2-33.el7_3.2.x86_64                                                                                                                      4/8
  Cleanup    : util-linux-2.23.2-33.el7.x86_64                                                                                                                          5/8
  Cleanup    : libmount-2.23.2-33.el7.x86_64                                                                                                                            6/8
  Cleanup    : libblkid-2.23.2-33.el7.x86_64                                                                                                                            7/8
  Cleanup    : libuuid-2.23.2-33.el7.x86_64                                                                                                                             8/8
  Verifying  : util-linux-2.23.2-33.el7_3.2.x86_64                                                                                                                      1/8
  Verifying  : libmount-2.23.2-33.el7_3.2.x86_64                                                                                                                        2/8
  Verifying  : libblkid-2.23.2-33.el7_3.2.x86_64                                                                                                                        3/8
  Verifying  : libuuid-2.23.2-33.el7_3.2.x86_64                                                                                                                         4/8
  Verifying  : libuuid-2.23.2-33.el7.x86_64                                                                                                                             5/8
  Verifying  : libblkid-2.23.2-33.el7.x86_64                                                                                                                            6/8
  Verifying  : util-linux-2.23.2-33.el7.x86_64                                                                                                                          7/8
  Verifying  : libmount-2.23.2-33.el7.x86_64                                                                                                                            8/8

 

Updated:
  libuuid.x86_64 0:2.23.2-33.el7_3.2

 

Dependency Updated:
  libblkid.x86_64 0:2.23.2-33.el7_3.2                     libmount.x86_64 0:2.23.2-33.el7_3.2                     util-linux.x86_64 0:2.23.2-33.el7_3.2

 

Complete!

# yum install libuuid.i686
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.excellmedia.net
 * extras: mirror.fibergrid.in
 * updates: mirror.fibergrid.in
Resolving Dependencies
--> Running transaction check
---> Package libuuid.i686 0:2.23.2-33.el7_3.2 will be installed
--> Finished Dependency Resolution

 

Dependencies Resolved

 

============================================================================================================================================================================
 Package                                Arch                                Version                                            Repository                              Size
============================================================================================================================================================================
Installing:
 libuuid                                i686                                2.23.2-33.el7_3.2                                  updates                                 77 k

 

Transaction Summary
============================================================================================================================================================================
Install  1 Package

 

Total download size: 77 k
Installed size: 19 k
Is this ok [y/d/N]: y
Downloading packages:
libuuid-2.23.2-33.el7_3.2.i686.rpm                                                                                                                   |  77 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libuuid-2.23.2-33.el7_3.2.i686                                                                                                                           1/1
  Verifying  : libuuid-2.23.2-33.el7_3.2.i686                                                                                                                           1/1

 

Installed:
  libuuid.i686 0:2.23.2-33.el7_3.2

 

Complete!

Related Entries and Links

No Related Resource entered.