错误命令行

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 (= :7.4.-1ubuntu3.) but :8.0.-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
  2. 再进行安装vim,执  sudo apt-get install vim

举一反三

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

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

The following packages have unmet dependencies:
openssh-server : Depends: openssh-client (= :.6p1-2ubuntu2.)
Recommends: ssh-import-id but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
 

Linux - ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common的更多相关文章

  1. [问题记录]Ubuntu下chmsee安装失败的解决

    日期:2016年2月26日 一直在找Ubuntu下查看chm的工具但是普遍不理想,发现在deepin中的chmsee相对比较好,但是直接执行网上的sudo apt-get install chmsee ...

  2. linux ubuntu下如何安装并且切换java版本(Unsupported major.minor version 52.0)

    最近在做一个dcos(数据中心操作系统)的东西,需要用marathon来做进程管理.遗憾的是0.6版本的marathon在API方面很是缺少,换成了0.15版本之后,运行时提示“Unsupported ...

  3. Linux(ubuntu)下手动安装 firefox 6 并且添加快捷方式图标

    Mozilla 正式发布了Firefox 6,如果你的电脑上还在用非常古老的版本么,赶紧过来更新下吧,由于官网上面只是提供了linux下的.bz2的压缩包,没有deb或者rmp格式,所以需要自己安装下 ...

  4. Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.

    报错命令 root@ubuntu:/etc/apt# apt-get update Err: http://mirrors.aliyun.com/ubuntu trusty InRelease Cou ...

  5. CentOS下MySQL安装失败,报socket '/tmp/mysql.sock错误解决方法

    1.在centos里安装mysql数据库后,登录时提示‘/tmp/mysql.sock’ 第一种解决办法:采用ln链接方式进行处理 ln -s /var/lib/mysql/mysql.sock /t ...

  6. ubuntu下Vim安装失败

    sudo apt-get install vim Reading package lists... Done Building dependency tree Reading state inform ...

  7. Linux(Ubuntu)下MySQL的安装与配置

    转自:http://www.2cto.com/database/201401/273423.html 在Linux下MySQL的安装,我一直觉得挺麻烦的,因为之前安装时就是由于复杂的配置导致有点晕.今 ...

  8. linux,windows,ubuntu下git安装与使用

    ubuntu下git安装与使用:首先应该检查本地是否已经安装了git ,如果没有安装的话,在命令模式下输入 sudo apt-get install git 进行安装 输入git命令查看安装状态及常用 ...

  9. Ruby入门--Linux/Windows下的安装、代码开发及Rails实战

    Ruby入门--Linux/Windows下的安装.代码开发及Rails实战 http://www.linuxidc.com/Linux/2014-04/100242.htm Ubuntu 13.04 ...

随机推荐

  1. SpringBoot图文教程15—项目异常怎么办?「跳转404错误页面」「全局异常捕获」

    有天上飞的概念,就要有落地的实现 概念十遍不如代码一遍,朋友,希望你把文中所有的代码案例都敲一遍 先赞后看,养成习惯 SpringBoot 图文教程系列文章目录 SpringBoot图文教程1-Spr ...

  2. vue的computed计算属性

    computed可定义一些函数,这些函数叫做[计算属性] 只要data里面的数据发生变化computed会同步改变 引用[计算属性]时不要加  () ,应当普通属性使用 例:console.log(t ...

  3. django验证码框架captcha

    1.安装 2.在settings.py 安装app中添加 3.添加url 4.运行makemigrations和migrate 5.运用 在form表单中定义 view中返回form表单 在前端htm ...

  4. python虚拟环境安装使用

    # 安装 pip install virtualenv pip install virtualenvwrapper-win # win环境下 liunx下不需要-win #创建一个文件夹并cd进去mk ...

  5. web测试喜事连连--草稿箱功能

    “草稿箱”功能很常见吧,编辑内容后,不想发布的话,就先存为草稿.啥时候想公开了,发布即可. 今天发生个啥事呢,让作为Tester的我,哭笑不得. 开发部经理老F,反馈一个客户需求,发到群里让大家讨论. ...

  6. 关于QThread使用锁死的探索

    在学习使用QT5的时候,发现要使用多线程处理多任务,按照https://www.cnblogs.com/liming19680104/p/10397052.html等很多网上的方法,测试一下,发现我写 ...

  7. css 固比固模型

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. python读取文件指定行内容

    python读取文件指定行内容 import linecache text=linecache.getline(r'C:\Users\Administrator\Desktop\SourceCodeo ...

  9. 基于 HTML5 WebGL 的发动机 3D 可视化系统

    前言     工业机械产品大多体积庞大.运输成本高,在参加行业展会或向海外客户销售时,如果没有实物展示,仅凭静态.简单的图片说明书介绍,无法让客户全面了解产品,不仅工作人员制作麻烦,客户看得也费力.如 ...

  10. props watch 接口抖动

    readType (val) { this.innerReadType = '-' this.$nextTick(() => { this.innerReadType = val }) },