15

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.

Braiam
  • 67,791
  • 32
  • 179
  • 269
  • 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. –  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

4 Answers4

2

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.

daithib8
  • 3,351
  • mate just had a mare trying to find all the rubbish left over from brave. had to keep using this. thanks – Chuck Jun 23 '23 at 23:07
2

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.)

1

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.

user4124
  • 8,911
  • I don't have a vim-runtime file in that directory. I only have a lock file and an empty partial directory there. –  Jan 28 '11 at 22:20
0
  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.

andrew.46
  • 38,003
  • 27
  • 156
  • 232
arrange
  • 14,959
  • 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. –  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.

    –  Jan 28 '11 at 22:53