I have a bunch of rpm files in a folder. I am trying to install them using:
rpm -ivh *.rpm
so rpm can take care of the correct installation order.
On some of these rpms I have a newer version installed in my system so I get for example:
package info-5.0-1 (which is newer than info-4.13a-2) is already installed
/opt/freeware/man/man1/infokey.1 from install of info-4.13a-2 conflicts with file from package info-5.0-1
Is there a way to ignore the old .rpm file and resolve the dependency with the new version that is already installed? I thought of the --force option. But how --force resolves the conflicts? Overwrites them with the older version or just ignores them leaving the new version?
Any thoughts are welcome.
Listing of the files inside an RPM package You can get a listing of the files inside an RPM by performing an RPM query and adding the “-p” switch: $ rpm -q -l -p bash-3.1-16.1. x86_64. rpm /bin/bash /bin/sh /etc/skel/.
By default, you must run the RPM installer with superuser permissions so that it has write access to the RPM installation database. In order to perform a non-root installation, you need to create and use a local user RPM installation database which does not require superuser permissions.
The --force
option will reinstall already installed packages or overwrite already installed files from other packages. You don't want this normally.
If you tell rpm
to install all RPMs from some directory, then it does exactly this. rpm
will not ignore RPMs listed for installation. You must manually remove the unneeded RPMs from the list (or directory). It will always overwrite the files with the "latest RPM installed" whichever order you do it in.
You can remove the old RPM and rpm
will resolve the dependency with the newer version of the installed RPM. But this will only work, if none of the to be installed RPMs depends exactly on the old version.
If you really need different versions of the same RPM, then the RPM must be relocatable. You can then tell rpm
to install the specific RPM to a different directory. If the files are not conflicting, then you can just install different versions with rpm -i
(zypper in
can not install different versions of the same RPM). I am packaging for example ruby gems as relocatable RPMs at work. So I can have different versions of the same gem installed.
I don't know on which files your RPMs are conflicting, but if all of them are "just" man pages, then you probably can simply overwrite the new ones with the old ones with rpm -i --replacefiles
. The only problem with this would be, that it could confuse somebody who is reading the old man page and thinks it is for the actual version. Another problem would be the rpm --verify
command. It will complain for the new package if the old one has overwritten some files.
Is this possibly a duplicate of https://serverfault.com/questions/522525/rpm-ignore-conflicts?
From the context, the conflict was caused by the version of the package.
Let's take a look the manual about rpm
:
--force
Same as using --replacepkgs, --replacefiles, and --oldpackage.
--oldpackage
Allow an upgrade to replace a newer package with an older one.
So, you can execute the command rpm -Uvh info-4.13a-2.rpm --force
to solve your issue.
Try Freshen command:
rpm -Fvh *.rpm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With