Determining Rocky Linux 8 Dependencies for Local RPM Packages

Determining Rocky Linux 8 Dependencies for Local RPM Packages

Overview

When deploying custom software packaged as RPMs — such as components of the Swarm platform — on Rocky Linux 8 systems, it is important to identify all required operating system dependencies. These dependencies typically consist of libraries and utilities provided by standard Rocky Linux repositories, as the custom packages themselves are not part of the official distribution.

This document outlines two methods for identifying such dependencies, helping ensure that all necessary packages are available for successful installation.

Prerequisites

To perform the steps outlined in this guide, the following are required:

  • A system running Rocky Linux 8 with standard repositories enabled (either online or configured for offline use via ISO/DVD).

  • The local .rpm file(s) to be analyzed (e.g., caringo-gateway-vers.noarch.rpm).

  • Access to standard Linux command-line tools: rpm, dnf.

  • Administrative privileges (sudo) may be required for certain commands.

Method 1: Initial Dependency Listing with rpm

Inspect the local .rpm file directly to see the dependencies explicitly listed within its metadata.

Command

The rpm command with the -qpR flags queries a package file (-p) for its requirements (-R).

rpm -qpR /path/to/caringo-gateway-vers.noarch.rpm

(Replace /path/to/… with the actual path to the local RPM file)

What It Does

  • Lists the explicit requirements defined in the package’s metadata.

  • Output includes capabilities, such as:

    • Package names

    • Required shared library versions (e.g., libc.so.6)

    • Specific features or system capabilities

Limitations

This method is helpful for initial checks, but should be followed up with full resolution when completeness is required.

  • Displays only direct dependencies listed in the file’s metadata.

  • Does not verify if the dependencies are available in the current system repositories.

  • Does not include recursive dependencies (i.e., dependencies of dependencies).

Method 2: Full Dependency Resolution Simulation with dnf

To resolve all dependencies—including transitive ones—dnf can simulate the installation of the RPM and determine the full set of required packages.

If the system does not have internet access, ensure Rocky Linux repositories are configured to use the Rocky Linux ISO or physical DVD. See Configuring DVD/ISO Repositories in Rocky Linux 8 for Offline Use

Command

Use the dnf install command pointing to the local .rpm file. This command is run without the -y flag to prevent automatic confirmation.

sudo dnf install /path/to/caringo-gateway-vers.noarch.rpm

(Replace /path/to/… with the actual file path).

What It Does

  • Analyzes the RPM’s metadata

  • Matches declared requirements with packages available in the enabled Rocky Linux repositories

  • Recursively resolves all required dependencies

  • Displays a summary of:

    • The local RPM(s) to be installed

    • Additional packages that would be pulled from the repository to satisfy dependencies. This list of additional packages represents the full set of OS-level dependencies required by the local RPM.

Important: Do Not Proceed with Installation

Carefully review the list of packages under "Installing dependencies". Do not confirm the installation if the goal is only to list dependencies. When prompted:

Is this ok [y/n]:

Type n (for no) or press Ctrl+C to abort the operation after the list is displayed.

Benefits

  • Provides a comprehensive list of dependencies.

  • Ensures that all OS-level packages required by the local RPM are identified.

  • Confirms that required packages are available in the current repository configuration.

© DataCore Software Corporation. · https://www.datacore.com · All rights reserved.