After I tried installing vim using apt-get install, apt-get keeps giving me a segmentation fault while trying to install vim-runtime. I'm pretty sure it's just with that one specific package, and whenever I try to do apt-get install to install any other package, vim-runtime is in the list of packages that will be installed, and it's always the first package that tries to install, so I can't install any other packages.

How can I remove vim-runtime from the list of packages that will be installed? It always shows up even if it is not a dependency of a package I want to install.

Note: This is on an Ubuntu rootfs running on ARM.

  • 6
    If apt-get segfaults — please report it. – ulidtko Jan 28 '11 at 22:40
  • Try dpkg --remove vim-runtime and see if it helps. – ulidtko Jan 28 '11 at 22:47
  • 1
    It gives me an error, saying: Package is in a very bad inconsistent state - you should reinstall it before attempting a removal. And of course, reinstalling also gives an error. – user9804 Jan 28 '11 at 22:55
  • normally you would run apt-get -f install to fix install issues like this, but if it segfaults during configuration, I am not sure it will work... – Born2Smile Apr 11 '16 at 21:42

The only correct way to make apt not try and install vim-runtime is to sudo apt-get remove vim.

Dpkg crashing while unpacking vim-runtime is either a serious bug, or an indication that something's wrong with your hardware. (Although hardware errors are usually more random.)


I suspect that the .deb file for vim-runtime did not download properly, so apt-get crashes on it.

Look into /var/cache/apt/archives and delete this vim-runtime* file. To do so, run

gksudo -- nautilus --no-desktop /var/cache/apt/archives/

It's fine to erase any other .deb files from that folder, as these are cached .deb. files.

  • I don't have a vim-runtime file in that directory. I only have a lock file and an empty partial directory there. – user9804 Jan 28 '11 at 22:20

I had this problem before and eventually I had to run dpkg -S package-name to find all the files associated with the package and delete them, which solved the problem.

  1. Back up and then remove these two files: /var/cache/apt/pkgcache.bin and /var/cache/apt/srcpkgcache.bin.
  2. Then update the file cache

    sudo apt-get update
  3. Test apt-get now.

If it helps, please upload the broken cache files somewhere and post a link, I'd like to have a look at them.

  • Sorry, that didn't help. The package still shows up whenever I try to install or remove another package, or when I do apt-get autoremove. – user9804 Jan 28 '11 at 22:40
  • I understand there is still the hanging package there, but does apt-get still give you segmentation fault? – arrange Jan 28 '11 at 22:49
  • Yep. I always get this error after it says Unpacking replacement vim-runtime... E: Sub-process /usr/bin/dpkg received a segmentation fault. I should have noted in the question that this is on an Ubuntu rootfs on ARM. – user9804 Jan 28 '11 at 22:53

Your Answer

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