0

Below commands show that one file is owned by two packages. Is there something wrong or is this an expected/acceptable behaviour with RPM packages?

$rpm -qf /bin/ls
coreutils-8.4-46.el6.x86_64
coreutils-8.4-47.el6.x86_64

$ rpm -qa|grep 'coreutils-8'
coreutils-8.4-46.el6.x86_64
coreutils-8.4-47.el6.x86_64

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)
  • Found a related article – penguin Mar 25 at 12:09
  • I'd nitpick and say that you have two versions of one package installed -- not the potential interpretation of "one file owned by two different packages" – Jeff Schaller Mar 25 at 12:25
  • Thanks - agreed. So, is that an acceptable/expected practice ? – penguin Mar 25 at 12:51
  • 1
    I'm impressed & confused as to how you managed to come to this state; what do you use to install/manage packages on this system? rpm? yum? Did you do anything recently with the coreutils package? – Jeff Schaller Mar 25 at 12:55
  • yum. Its an old server. If its not a good thing, I need to dig for more details. – penguin Mar 25 at 13:03
1
  1. No, a file cannot be owned by two rpm packages
  2. You have two versions of the same package installed. You need to solve that issue.

Personally I have already encountered this some times when updating some packages and then the server is powered off, so data is incomplete on disk. You can try repairing the rpmdb:

rpm --rebuilddb

If you have two packages installed even after rpm db rebuild , you could try just removing both and then reinstalling the one you want.

  • 1
    You can remove just one package when you specify full NEVRA, i.e. "rpm -e coreutils-8.4-46.el6.x86_64" This will remove the old package and keep the new one. – msuchy Mar 26 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.