Preparing to unpack .../vim-runtime_2%3a8.0.1453-1ubuntu1.3_all.deb ...
Unpacking vim-runtime (2:8.0.1453-1ubuntu1.3) over (2:8.0.1453-1ubuntu1.1) ...
dpkg: error processing archive /var/cache/apt/archives/vim-runtime_2%3a8.0.1453-1ubuntu1.3_all.deb (--unpack):
trying to overwrite '/usr/share/vim/vim80/doc/help.txt', which is also in package vim-tiny 2:8.0.1453-1ubuntu1.3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/vim-runtime_2%3a8.0.1453-1ubuntu1.3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
何时sudo dpkg --configure -a
运行
sudo dpkg --configure -a
dpkg: dependency problems prevent configuration of vim-tiny:
vim-tiny depends on vim-common (= 2:8.0.1453-1ubuntu1.3); however:
Package vim-common is not configured yet.
dpkg: error processing package vim-tiny (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of vim:
vim depends on vim-common (= 2:8.0.1453-1ubuntu1.3); however:
Package vim-common is not configured yet.
vim depends on vim-runtime (= 2:8.0.1453-1ubuntu1.3); however:
Version of vim-runtime on system is 2:8.0.1453-1ubuntu1.1.
dpkg: error processing package vim (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
vim-tiny
vim
我努力了
sudo apt install -f
||sudo apt install --fix-broken
全部失败
答案1
vim-runtime
我最终从以下位置手动获取了请求的依赖项版本(2:8.0.1453-1ubuntu1.3)https://ubuntu.pkgs.org/18.04/ubuntu-updates-main-amd64/vim-runtime_8.0.1453-1ubuntu1.3_all.deb.html
然后我就跑了,
sudo dpkg -i vim--runtime_{version}
返回了覆盖错误:
Unpacking vim-runtime (2:8.0.1453-1ubuntu1.3) over (2:8.0.1453-1ubuntu1.1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/share/vim/vim80/doc/help.txt', which is also in package vim-tiny 2:8.0.1453-1ubuntu1.3
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/share/vim/vim80/doc/tags', which is also in package vim-tiny 2:8.0.1453-1ubuntu1.3
Setting up vim-runtime (2:8.0.1453-1ubuntu1.3) ...
通过运行以下命令可以修复此问题:sudo dpkg -i --force-overwrite vim--runtime_{version}