Troubleshooting Dependency Conflicts for Linux Patching
When installing Linux patches, a dependency conflict can occur when attempting to update a package that depends on a certain version of another package. This article explains how to identify and remediate dependency conflicts.
Identifying Deployment Errors in Tanium Patch
Endpoints that encounter dependency conflicts will report a status of Needs Attention for the Patch deployment. Review the deployment errors on the Patch deployment or use the Patch – Deployment Errors sensor for more information. Below are some examples of deployment error messages that indicate a dependency conflict:
-
“a dependency error was encountered”
-
“a conflicting dependency error was encountered”
-
“dependency resolution failed with the message: none of the providers can be installed; cannot install the best update candidate.”
-
“dependency resolution failed due to an architecture mismatch (ie trying to install i686 but only x86_64 is available in the repository)”
Potential Reasons for Dependency Conflicts
-
A repository that provides a necessary package is not configured. Depending on your Linux scan method:
-
If you are using the Tanium Scan method (or less commonly the Repository Scan method without use repositories configured on the endpoint enabled), repositories must be configured in Tanium.
-
If you are using the Repository Scan method with use repositories configured on endpoint enabled, repositories must be enabled on the endpoint.
-
-
A local exclusion is present for a package on the endpoint. Patch will not install packages that are blocked in the
/etc/yum.conffile. If the local exclusion is causing a dependency conflict, you may choose to either:-
Add the patch to a block list. For more information, see the Identify the Relevant Patch and Create a Block List section.
-
Remove or override the exclusion in
/etc/yum.confto install the required dependency.
-
-
You are using a patch list with a release date rule.
-
The behavior of Linux package managers is to attempt to install the latest version of a dependency.
-
Using repository snapshots instead is recommended to avoid dependency conflicts due to release dates.
-
Identifying Cause of Dependency Conflict in Endpoint Logs
You need to review the endpoint's Patch logs to get more information about the dependency conflict. The logs can be obtained in an Endpoint Must Gather (EMG) or on the endpoint (/opt/Tanium/TaniumClient/Tools/Patch/logs/patch-process.log).
Below is an example in the patch-process.log for a RHEL 8 endpoint that has a dependency error (emphasis added):
The first and last lines of the error message tells us that gdk-pixbuf2-xlib-2.36.12-5.el8.x86_64 is currently installed, and that gdk-pixbuf2-2.36.12-5.el8.x86_64 is a dependency required by this installed package.
The middle lines tell us the conflict that is encountered for this dependency. DNF is trying to install the package gdk-pixbuf2-2.36.12-6.el8_10.x86_64. However, installing this package would break the installed package gdk-pixbuf2-xlib-2.36.12-5.el8.x86_64. If this gdk-pixbuf2-xlib package was also being upgraded to 2.36.12-6, then this would not be an issue.
Therefore, our next step to resolve the conflict is to determine why gdk-pixbuf2-xlib-2.36.12-6.el8.x86_64 is not attempting to install.
To check which repository provides a package, you can search the package reference site for the distribution, such as:
-
Red Hat Package Browser (Red Hat log in required)
For this example, we would use the Red Hat package browser. Search for the name of the package (gdk-pixbuf2-xlib), navigate to the applicable architecture (x86_64), and choose the version (2.36.12-6). This tells us that the package is available from the repository codeready-builder-for-rhel-8-x86_64-rpms.
For this example, the dependency error is due to the missing repository codeready-builder-for-rhel-8-x86_64-rpms and the resolution is to configure the repository.
Identify the Relevant Patch and Create a Block List
The steps in this section are optional and designed to prevent dependency failures in the future.
You may choose to block a patch that is causing a deployment failure. Either because you have determined the patch should not be installed, or as a temporary mitigation effort while implementing the resolution.
On the Patch > Patches page, add the Files column to view the package names and versions associated with each patch.
Then, search for the filename of the package that was attempting to install and causing the dependency conflict. For this example, this was gdk-pixbuf2-2.36.12-6.el8_10.x86_64.
Select the patch, then click the More dropdown to either create a new block list or add to an existing block list. If creating a new block list, target the block list to a computer group containing the affected endpoints.