RPM Conflicts

Different Packages | Upgrades and Multiple Package Architectures

Different Packages

If two different RedHat Package Manager (RPM) packages share the same file, such as /etc/init.d, the second package will not install without a --force argument to rpm. While --force avoids the problem, the packages should be rebuilt not to conflict, for easier installation via Yellowdog Updater, Modified (YUM).

If installing configuration files via packages, consider instead using packages to install the base software, then use configuration management such as CFEngine to setup the appropriate configuration on various classes of systems.

Upgrades and Multiple Package Architectures

Conflicts may occur when installing updated software when the system has two versions of the same package installed, but for two different architectures. Consider the following example and solution.

$ sudo rpm -Uvh cfengine-2.1.20-1.x86_64.rpm
Preparing...
# ########################################## [100%]
file /usr/share/cfengine/ChangeLog from install of
cfengine-2.1.20-1 conflicts with file from package
cfengine-2.1.17-6
file /usr/share/cfengine/INSTALL from install of
cfengine-2.1.20-1 conflicts with file from package
cfengine-2.1.17-6
file /var/cfengine/inputs/update.conf from install of
cfengine-2.1.20-1 conflicts with file from package
cfengine-2.1.17-6
$ rpm --queryformat='%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' -q cfengine
cfengine-2.1.17-6.i386
cfengine-2.1.17-6.x86_64
$ sudo rpm -e cfengine
error: "cfengine" specifies multiple packages
$ sudo rpm -e cfengine-2.1.17-6.i386
$ rpm --queryformat='%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' -q cfengine
cfengine-2.1.17-real6.x86_64

With only one package installed, the upgrade should work without conflicts.