GLPI Agent Install Fail On Rocky Linux 10: How To Fix

by Alex Johnson 54 views

Introduction

Are you experiencing issues installing the GLPI Agent on Rocky Linux 10? You're not alone. A common problem encountered is the failure due to a missing dependency: perl(Socket::GetAddrInfo). This article will guide you through understanding the issue and provide a step-by-step solution to get your GLPI Agent up and running on Rocky Linux 10.

Understanding the Issue: Missing perl(Socket::GetAddrInfo)

The perl(Socket::GetAddrInfo) dependency is a crucial Perl module required by the GLPI Agent. It facilitates network address resolution, a fundamental process for the agent to communicate with the GLPI server. The error message you're likely seeing, such as:

Problem: conflicting requests
  - nothing provides perl(Socket::GetAddrInfo) needed by glpi-agent-1.15-1.noarch from @commandline

indicates that this module is not available in the default Rocky Linux 10 repositories, specifically EPEL 10. This discrepancy prevents the GLPI Agent installation from completing successfully.

This issue arises because the perl(Socket::GetAddrInfo) module, while commonly available in other distributions, may not be included in the standard repositories for Rocky Linux 10. This can be due to differences in package management or repository configurations. To resolve this, we need to manually install the missing module.

Step-by-Step Solution: Installing the Missing Dependency

To successfully install the GLPI Agent, we need to provide the missing perl(Socket::GetAddrInfo) dependency. Here's a step-by-step guide to resolve this issue:

Step 1: Enabling the CRB Repository (If Not Already Enabled)

The CRB (Community Resilient Build) repository contains packages that are not in the main Rocky Linux repositories but may be required for certain applications. In some cases, the perl(Socket::GetAddrInfo) module might be available in the CRB. To enable it, run the following command:

sudo dnf config-manager --set-enabled crb

This command instructs the DNF package manager to enable the CRB repository, making its packages available for installation. This is a crucial step, as it expands the pool of available packages and increases the likelihood of finding the required dependency.

Step 2: Installing perl-Socket-GetAddrInfo using CPAN

If the module is not available in the CRB repository, we can install it using CPAN (Comprehensive Perl Archive Network), a repository of Perl modules. CPAN provides a vast collection of Perl modules and is the standard way to install them.

First, install the cpan module if it's not already installed:

sudo dnf install perl-CPAN

This command installs the necessary CPAN modules, allowing you to use the cpan command-line tool. Once installed, you can proceed to install the Socket::GetAddrInfo module.

Next, run the following command to start the CPAN shell:

sudo perl -MCPAN -e shell

This command launches the CPAN interactive shell, where you can install Perl modules. CPAN might ask you some configuration questions upon the first run. You can usually accept the defaults.

Within the CPAN shell, install the Socket::GetAddrInfo module:

install Socket::GetAddrInfo

The CPAN shell will download, build, and install the module along with any other dependencies. Follow the on-screen prompts, and CPAN will handle the installation process automatically. This might take a few minutes depending on your internet connection and system performance.

Step 3: Verifying the Installation

After the installation, it's essential to verify that the module is correctly installed. You can do this by running a simple Perl command:

perl -MSocket::GetAddrInfo -e 'print