Apt-get问题和错误:VIM

我找到了这个很棒的链接: 如何在添加PPA后解决未满足的依赖关系? 但我似乎无法得到任何涉及apt-get正确运行的命令。

我的主要问题是分区填满而不知道原因,所以我正在尝试删除不需要的包。

Ex: apt-get purge aspell-en returns: Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: vim : Depends: vim-runtime (= 2:7.2.445+hg~cb94c42c0e1a-1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

无论我选择哪个apt-get命令,都会出现此消息,包括那些首先要解决问题的命令!

更糟糕的是,我的磁盘100%已满,我无法弄清楚如何修复。

 When I run: apt-get -f install , it says: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: vim-runtime The following NEW packages will be installed: vim-runtime 0 upgraded, 1 newly installed, 0 to remove and 228 not upgraded. 1 not fully installed or removed. Need to get 6,207 kB of archives. After this operation, 26.0 MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.us.debian.org/debian/ squeeze/main vim-runtime all 2:7.2.445+hg~cb94c42c0e1a-1 [6,207 kB] Fetched 6,207 kB in 1s (3,907 kB/s) (Reading database ... 131282 files and directories currently installed.) Unpacking vim-runtime (from .../vim-runtime_2%3a7.2.445+hg~cb94c42c0e1a-1_all.deb) Adding 'diversion of /usr/share/vim/vim72/doc/help.txt to /usr/share/vim/vim72/doc/help.txt.vim-tiny by vim-runtime' dpkg-divert: rename involves overwriting `/usr/share/vim/vim72/doc/help.txt.vim-tiny' with different file `/usr/share/vim/vim72/doc/help.txt', not allowed dpkg: error processing /var/cache/apt/archives/vim- runtime_2%3a7.2.445+hg~cb94c42c0e1a-1_all.deb (--unpack): subprocess new pre-installation script returned error exit status 2 configured to not write apport reports No diversion 'diversion of /usr/share/vim/vim72/doc/help.txt by vim-runtime', none removed. No diversion 'diversion of /usr/share/vim/vim72/doc/tags by vim-runtime', none removed. Errors were encountered while processing: /var/cache/apt/archives/vim-runtime_2%3a7.2.445+hg~cb94c42c0e1a-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) 

如果我尝试删除vim-runtime,我得到:

 Package vim-runtime is not installed, so not removed You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: vim : Depends: vim-runtime (= 2:7.2.445+hg~cb94c42c0e1a-1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

首先,尝试它告诉你尝试的命令:

 apt-get -f install 

修复任何破损的包裹。 如果您的磁盘已满,这可能会也可能不会起作用,具体取决于是否已完全下载损坏的软件包。

如果上述因空间不足而无效,请尝试

 aptitude clean 

释放一些空间。 但请注意,这将清除apt包缓存(这些是您安装的包的.deb文件;存储在/var/cache/apt/archives ); 实际的软件包将保持安装状态,但您将不再拥有磁盘上的.deb文件,并且如果您清除/重新安装现有软件包,则需要重新下载它们。

更新

在回答您编辑的问题时,我认为您需要:

 apt-get purge vim vim-runtime apt-get install vim vim-runtime