Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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
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 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.)

share|improve this answer

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.

share|improve this answer
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.

share|improve this answer
  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.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.