tell yum to ignore a single dependency

Solution 1:

The rpm command has the --nodeps option that you can use. A challenge is that rpm by itself is not aware of yum repositories. The following command will install or update the package, ignoring dependencies, but automatically looking up the download URL from your repositories with repoquery which is in package yum-utils.

rpm -Uvh --nodeps $(repoquery --location winswitch)

After that, a regular yum update will likely succeed without dependency errors.

Solution 2:

Generally yum doesn't have options to ignore a single package from the dependencies. Option --skip-broken ignores all unresolved dependences.

You can try yum --exclude=packagename but it excludes a specific package by name or glob from updates on all repositories, not from dependencies.

Solution 3:

It sounds like you're trying to install package that has not been designed for the OS, i.e. if it was designed for CentOS it would require nx correctly.

Another workaround for the problem is to create and install a small shim RPM package that contains no files, but in the spec file contains the following lines (amongst others):

requires: nx
provides: nxagent

That way the dependency should be satisfied however it may be expecting files to be in a location that differs between the nxagent package it expects to have installed and the nx package that CentOS provides.