前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Linux - ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common

Linux - ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common

作者头像
小菠萝测试笔记
发布2020-06-09 15:58:27
1.2K0
发布2020-06-09 15:58:27
举报

错误命令行

代码语言:javascript
复制
root@ubuntu:/etc/apt# apt 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.4.052-1ubuntu3.1) but 2:8.0.1453-1ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.

原因

已有安装过vim,但没有安装成功

解决方案

  1. 先执行

sudo apt-get remove vim-common 卸载vim-common

  1. 再进行安装vim,执

sudo apt-get install vim

举一反三

执行安装命令的时候,只要报出类似这样的错误,则需要先remove,然后再次install;下面这个就是 apt-get install openssh-client 报的错误,解决方案相同

重点在于: Unable to correct problems, you have held broken packages. ,表示有一个破碎的包

代码语言:javascript
复制
The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:6.6p1-2ubuntu2.13)
                  Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-04-11 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 错误命令行
  • 原因
  • 解决方案
  • 举一反三
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档