2nd install of xi-2024R2.1 fails - I fixed it
Posted: Thu Aug 28, 2025 2:18 pm
Iterating through Nagios installs, fixing things that did not complete, I found this.
in the file /tmp/nagiosxi/01-prereqs
At the end, there is a pecl install. If this has already been installed, the script will error out.
like this:
Basically, test for the install, and if not found, then install it.
Just sharing in case anyone else has this problem.
Steve B
in the file /tmp/nagiosxi/01-prereqs
At the end, there is a pecl install. If this has already been installed, the script will error out.
like this:
To address this failure: the internet is your friend...pecl/ssh2 is already installed and is the same as the released version 1.4.1
install failed
edit the 01-prereqs file, and at the bottom change it to look like this.When using pecl install for a package that is already installed, it can fail because PECL typically flags existing installations as an error rather than a "nothing to do" state. This behavior can be problematic in automated scripts or when attempting to re-install a module.
To avoid errors and ensure the command is idempotent (meaning it can be run multiple times with the same result), you can check if the package is already installed before attempting to install it.
Code: Select all
# Adds ssh2 VIA pecl to support newer versions of PHP
# test pecl install - if it is already installed it will FAIL
if ! pecl list | grep -q ssh2; then
printf "\n" | pecl install ssh2
echo "extension=ssh2" > /etc/php.d/ssh2.ini
fi
# Adds ssh2 VIA pecl to support newer versions of PHP
# printf "\n" | pecl install ssh2
# echo "extension=ssh2" > /etc/php.d/ssh2.iniJust sharing in case anyone else has this problem.
Steve B