古い Ubuntu で一度に Apt upgrade すると以下のようなエラーが出た。
Preparing to unpack .../vim-runtime_2%3a7.4.052-1ubuntu3.1_all.deb ...
Adding 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
dpkg-divert: error: rename involves overwriting `/usr/share/vim/vim74/doc/help.txt.vim-tiny' with
different file `/usr/share/vim/vim74/doc/help.txt', not allowed
dpkg: error processing archive /var/cache/apt/archives/vim-runtime_2%3a7.4.052-1ubuntu3.1_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
Processing /usr/share/vim/addons/doc
Errors were encountered while processing:
/var/cache/apt/archives/vim-runtime_2%3a7.4.052-1ubuntu3.1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo apt remove vim
して
sudo apt install vim
しても同じエラーが出る。
- sudo apt-get -f install
- sudo dpkg --configure -a
- apt purge vim vim-runtime
- apt install vim vim-runtime
したりしたが効果なし。
結局、効果があったのは以下
sudo rm -fR /usr/share/vim/vim74/doc
sudo apt install vim vim-runtime