IBM Support

Installing a specific version of software on SUSE Linux

How To


Summary

Installing a specific version of software on SUSE Linux

Objective

On SUSE Linux (SUSE Linux Enterprise Server) it is possible to install older versions of software RPM using the zypper tool.
This presumes that other package dependencies are met and associated software can also be installed to meet them.

Environment

SUSE Linux (SUSE Linux Enterprise Server)

Additional Information

In this example we'll install the "sysstat" package, which includes the sar and sadc binaries.

First, list out the versions that the system knows about, using "zypper search -s":

# zypper search -s sysstat
Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP3_s390x'.
Loading repository data...
Reading installed packages...
S | Name        | Type      | Version       | Arch  | Repository       
--+--------------+------------+----------------+--------+-------------------
 | sysstat     | package   | 12.0.2-10.18.1 | s390x | SLES12-SP3-Updates
 | sysstat     | package   | 12.0.2-10.15.1 | s390x | SLES12-SP3-Updates
 | sysstat     | package   | 10.2.1-10.12.1 | s390x | SLES12-SP3-Updates
 | sysstat     | package   | 10.2.1-10.9.1 | s390x | SLES12-SP3-Updates
 | sysstat     | package   | 10.2.1-10.6.1 | s390x | SLES12-SP3-Updates
 | sysstat     | package   | 10.2.1-9.2    | s390x | SLES12-SP3-12.3-0
 | sysstat     | package   | 10.2.1-9.2    | s390x | SLES12-SP3-Pool  

If you were to simply type

# zypper install sysstat

It would install the most current version. However if we want to install an older one we can use the EDITION option to zypper to specify which one we want.

As per the zypper man page:

      install (in) [options] name|capability|rpm_file_uri...
          Install or update packages.

          The packages can be selected by their name or by a capability they
          provide.

              A capability is formed by "NAME[.ARCH][ OP EDITION]", where
              ARCH is an architecture code, OP is one of <, <=, =, >=, or >
              and EDITION is "VERSION[-RELEASE]". For example: zypper=0.8.8-2
              The NAME component of a capability is not only a package name
              but any symbol provided by packages: /bin/vi, libcurl.so.3,
              perl(Time::ParseDate). Just remember to quote to protect the
              special characters from the shell, for example: zypper\>0.8.10
              or 'zypper>0.8.10'.

              If EDITION is not specified, the newest installable version
              will be installed. This also means that if the package is
              already installed and newer versions are available, it will get
              upgraded to the newest installable version.

So we use the = sign to signify we want exactly that version (aka EDITION).

Note in zypper we can also use "v" to show the version that will be installed:

# zypper install sysstat=10.2.1-9.2
Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP3_s390x'.
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
 sysstat

1 new package to install.

Overall download size: 243.1 KiB. Already cached: 0 B. After the operation,
additional 962.4 KiB will be used.
Continue? [y/n/...? shows all options] (y): v

The following NEW package is going to be installed:
 sysstat 10.2.1-9.2

1 new package to install.

Overall download size: 243.1 KiB. Already cached: 0 B. After the operation,
additional 962.4 KiB will be used.
Continue? [y/n/...? shows all options] (y): y

Retrieving package sysstat-10.2.1-9.2.s390x
                                          (1/1), 243.1 KiB (962.4 KiB unpacked)
Checking for file conflicts: .............................................[done]
(1/1) Installing: sysstat-10.2.1-9.2.s390x ...............................[done]

We can double-check that it was installed at the version we want using rpm:

# rpm -qa sysstat
sysstat-10.2.1-9.2.s390x

Document Location

Worldwide


[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SGMV168","label":"SUSE Linux Enterprise Server"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

More support for:
SUSE Linux Enterprise Server

Software version:
All Versions

Document number:
959229

Modified date:
01 April 2021

UID

ibm10959229

Manage My Notification Subscriptions