ubuntu 安装vim失败解决办法

本文介绍了在Ubuntu系统中解决Vim安装问题的过程,包括移除冲突的软件包、重新安装Vim及其依赖项,并详细展示了操作命令及反馈信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

root@ubuntu:/etc/apt# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 vim : Depends: vim-common (= 2:7.3.429-2ubuntu2) but 2:7.3.429-2ubuntu2.1 is to be installed
E: Unable to correct problems, you have held broken packages.
root@ubuntu:/etc/apt# apt-get remove vim-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  thunderbird-globalmenu
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  ubuntu-minimal vim-common vim-tiny
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
After this operation, 1,206 kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 144006 files and directories currently installed.)
Removing ubuntu-minimal ...
Removing vim-tiny ...
update-alternatives: using /usr/bin/see to provide /usr/bin/view (view) in auto mode.
Removing vim-common ...
Processing triggers for man-db ...
root@ubuntu:/etc/apt# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  thunderbird-globalmenu
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  vim-common vim-runtime
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim vim-common vim-runtime
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,028 kB of archives.
After this operation, 25.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://mirrors.163.com/ubuntu/ precise/main vim-common amd64 2:7.3.429-2ubuntu2 [86.6 kB]
Get:2 http://mirrors.163.com/ubuntu/ precise/main vim-runtime all 2:7.3.429-2ubuntu2 [5,893 kB]
Get:3 http://mirrors.163.com/ubuntu/ precise/main vim amd64 2:7.3.429-2ubuntu2 [1,048 kB]                                                                                                                   
Fetched 7,028 kB in 15s (466 kB/s)                                                                                                                                                                          
Selecting previously unselected package vim-common.
(Reading database ... 143951 files and directories currently installed.)
Unpacking vim-common (from .../vim-common_2%3a7.3.429-2ubuntu2_amd64.deb) ...
Selecting previously unselected package vim-runtime.
Unpacking vim-runtime (from .../vim-runtime_2%3a7.3.429-2ubuntu2_all.deb) ...
Adding 'diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime'
Selecting previously unselected package vim.
Unpacking vim (from .../vim_2%3a7.3.429-2ubuntu2_amd64.deb) ...
Processing triggers for man-db ...
Setting up vim-common (2:7.3.429-2ubuntu2) ...
Setting up vim-runtime (2:7.3.429-2ubuntu2) ...
Processing /usr/share/vim/addons/doc
Setting up vim (2:7.3.429-2ubuntu2) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode.
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值