Apt-get 问题和错误:VIM

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 命令,都会出现此消息,包括那些首先用于解决问题的命令!

更糟糕的是,我的磁盘已满,我不知道如何修复。

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

答案1

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

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

相关内容