[FIXED] Errors were encountered while processing: /var/cache/apt/archives/vim-runtime_2%3a7.4.052-1ubuntu3_all.deb

Problem: vim install fails during dist-upgrade and running sudo apt-get -f install gives the error below
syslog:/var/syslog-ng/wcs$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
The following packages will be upgraded:
1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
44 not fully installed or removed.
Need to get 0 B/4,888 kB of archives.
After this operation, 412 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 64153 files and directories currently installed.)
Preparing to unpack .../vim-runtime_2%3a7.4.052-1ubuntu3_all.deb ...
Leaving 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime'
dpkg-divert: error: rename involves overwriting `/usr/share/vim/vim74/doc/tags.vim-tiny' with
different file `/usr/share/vim/vim74/doc/tags', not allowed
dpkg: error processing archive /var/cache/apt/archives/vim-runtime_2%3a7.4.052-1ubuntu3_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
Processing /usr/share/vim/addons/doc
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)


All of the issues seemed to be down to the doc folder, nuking it meant that the install completed successfully
sudo rm -fR /usr/share/vim/vim74/doc/

Leave a Reply