RPM ignore conflicts

Posted on

RPM ignore conflicts – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, unix, rpm, aix, .

is there a way to ignore rpm version conflicts by keeping the latest version installed?

For example. I want to install gawk in AIX. I have all the required rpms in a folder

bash-4.2-11.aix5.1.ppc.rpm
gawk-4.0.2-1.aix5.1.ppc.rpm
gettext-0.10.40-8.aix5.2.ppc.rpm
info-4.13a-2.aix5.1.ppc.rpm
libsigsegv-2.10-1.aix5.2.ppc.rpm
readline-6.2-4.aix5.1.ppc.rpm

I try to install them with rpm giving rpm -ivh *.rpm so that rpm will automatically take care of the installation order.

But I get:

package bash-4.2-11 is already installed
package gettext-0.17-7 (which is newer than gettext-0.10.40-8) is already installed
package info-5.0-1 (which is newer than info-4.13a-2) is already installed
package readline-6.2-4 is already installed
file /opt/freeware/bin/msgcomm from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/bin/msgfmt from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/bin/msgmerge from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/bin/msgunfmt from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/bin/ngettext from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/bin/xgettext from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/lib/libintl.a from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/bin/gettext from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/bin/msgcmp from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/share/locale/locale.alias from install of gettext-0.10.40-8 conflicts with file from package gettext-0.17-7
file /opt/freeware/info/info-stnd.info.gz from install of info-4.13a-2 conflicts with file from package info-5.0-1
file /opt/freeware/info/info.info.gz from install of info-4.13a-2 conflicts with file from package info-5.0-1
file /etc/X11/applnk/Utilities/info.desktop from install of info-4.13a-2 conflicts with file from package info-5.0-1
file /opt/freeware/man/man1/info.1 from install of info-4.13a-2 conflicts with file from package info-5.0-1
file /opt/freeware/man/man1/infokey.1 from install of info-4.13a-2 conflicts with file from package info-5.0-1
file /opt/freeware/man/man1/install-info.1 from install of info-4.13a-2 conflicts with file from package info-5.0-1
file /opt/freeware/man/man5/info.5 from install of info-4.13a-2 conflicts with file from package info-5.0-

So, is there a way to ignore the gettext and info conflict by just doing nothing? I don’t want to use force and replace them with older versions.

I know that if I try to install the rpms manually one-by-one without installing the gettext and info rpms the installation of gawk will succeed.

I want to find a solution which doesn’t involve me manually installing the rpms in the correct order.

edit:
I have true -Uvh The problem with rpm -Uvh *.rpm is that instead of installing the new rpm binaries by resolving their dependencies with the ones that are already installed or in the folder, it just outputs:

package gettext-0.17-7 (which is newer than gettext-0.10.40-8) is already installed
package info-5.0-1 (which is newer than info-4.13a-2) is already installed
package readline-6.2-4 is already installed

and it stops without progressing to the other rpms that need to be installed. I believe this is not a normal behavior and I don’t know if this has to do with a problem in rpm (I am using an old version – version 3).

Solution :

So,

I am posting here my partial answer because I think my main question may be a little bit misleading.

The rpm -Uvh *.rpm is the way to go. It updates packages that are already installed with a new version of the packages in a folder and it also installs new rpms that are not already installed in the system.

But! When you try to install rpms using rpm -Uvh *.rpm if a package in the folder is the same version or older than a package already installed then it doesn’t continue with the execution. The command just outputs which packages are already installed and stops there without proceeding to the installation of the other rpms.

I consider this as a buggy behavior of the old rpm I am using (version 3). I don’t know if this is considered normal and if it happens also in the latest version of rpm. Maybe you can provide more info on that.

Since you are updating existing packages, rather than exclusively installing packages, you need to use the update option -U instead of the install option -i. This will allow you to both install and update packages at once.

rpm -Uvh *.rpm

You don’t specify, but it looks like you are using Michael Perzl’s RPMs.

If this is the case, follow the instructions in the FAQ to:

  1. download all the dependencies
  2. use gettext-0.17 to avoid known errors when using gettext-0.10
  3. it is safer to use the latest versions available, so replace the existing packages with the new ones when installing using rpm -Uvh.

Leave a Reply

Your email address will not be published. Required fields are marked *