Previous Topic: rpm --requires—Detect Library DependenciesNext Topic: Modify the Oracle Database Host Settings After Installation


rpm --whatprovides—Verify That a Library Exists

Before installing Enterprise Management on Linux, verify that all required libraries are present on the target system.

The command uses the following syntax:

rpm -q --whatprovides capability

The command has the following parameters:

-q

Specifies that you want to query RPM package information.

--whatprovides capability

Specifies that you want to retrieve information which packages provide the capability.

Example: Verify that a library is installed

In this example, you want to verify that libcrypt.so.1 is installed. You receive a positive answer ($? is 0) and you learn that its is the glibc-2.5-42 package that provides libcrypt.so.1.

root> rpm -q --whatprovides libcrypt.so.1
glibc-2.5-42
root> echo $?
0

Example: Detect that a library is not installed

In this example, you want to find out whether libexample.so.1 is installed. You receive a negative answer ($? is 1), because no package is installed that provides this capability.

root> rpm -q --whatprovides libexample.so.1
no package provides libexample.so.1
root> echo $?
1

If a required library is missing, install it before proceeding the installation.

More information:

rpm --requires—Detect Library Dependencies