25

I recently updated my fedora to 20 and wanted to install vim.but running sudo yum install vim returned this error:

Transaction check error:
  file /usr/share/man/man1/vim.1.gz from install of vim-common-2:7.4.179-1.fc20.x86_64 conflicts with file from package vim-minimal-2:7.4.027-2.fc20.x86_64

Error Summary
-------------

How to fix this problem?

  • 2
    Or update your packages first. The vim-common you are installing is newer than the vim-minimal already installed. – Leiaz Mar 12 '14 at 12:12
  • @Flup thanks! problem solved. You may post you comment as an answer, so I can accept it! :D – saeed Mar 12 '14 at 14:12
  • 1
    This is actually a bug in the vim package. – DanC Sep 16 '14 at 2:07
  • 1
    Beware - removing vim-minimal will also remove sudo unless you spot this and cancel the operation - not good for a production server! – RichVel Feb 2 '17 at 12:50
23

Before you remove vim-minimal, login with root user or do: sudo -s

After that, remove vim-minimal with the command: yum remove vim-minimal

Then you can install vim: yum install vim and after that install sudo: yum install sudo

  • If sudo(1) isn't installed, OP can hardly run it... – vonbrand Mar 18 '14 at 19:42
  • 4
    @vonbrand sudo is coupled to vim-minimal, so it gets removed as well. If you are root you avoid the catch-22 – mitchus Apr 4 '14 at 10:17
  • 2
    I'd like to point out that this situation is bizarre... – Steven Lu Sep 21 '14 at 4:16
  • 1
    Definitely a good idea to get a root shell before removing vim-minimal. Yes it is a bizarre situation. – JonnyRo Jan 2 '15 at 23:55
  • Yikes, this (package management) is one of the biggest reasons I can't bring myself to switch to Fedora from Ubuntu. I just ran into this in Fedora 23 using dnf. I can't believe their dependency resolution is so bad that you have to uninstall sudo first just to install vim! – bmaupin May 5 '16 at 16:58
26
file /usr/share/man/man1/vim.1.gz from install of vim-common-2:7.4.179-1.fc20.x86_64 conflicts with file from package vim-minimal-2:7.4.027-2.fc20.x86_64

Both vim-common and vim-minimal ship a copy of the vim man page. Ordinarily, this does not result in an RPM conflict, since the files will be identical in both packages.

However, you seem to have different versions of vim-common and vim-minimal, so the file is not identical, thus resulting in the conflict. Update vim-minimal to be the same version as vim-common, and the problem will go away.

yum update vim-minimal 

and then

yum install vim-enhanced
  • 4
    thank you! I find this solution safer than the scary removal of 'sudo' coupled to vim-minimal – phil_w Apr 25 '16 at 1:06
  • 2
    The general rule is: always update to the latest package set before installing anything. – mattdm Jan 16 '17 at 21:39
  • 1
    This should be the selected answer! Safer and cleaner, thank you – NorTicUs Sep 7 '17 at 10:14
  • This should be narked as the accepted answer – Sand1512 Jun 11 '18 at 6:22
7

This is still happening in Fedora 23. My solution was to update both packages:

sudo dnf update vim-common vim-minimal

If I tried to update either package separately, I got the conflict. But I was able to successfully update both of them at the same time.

1

You need to update vim-common package. As for Fedora 26, there's no vim-common package, so it's included in vim-minimal package instead. Then, you just have to update it with sudo dnf update vim-minimal and then you can install vim-enhanced (the real package you'll get for vim one).

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.