错误命令行

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. win下安装virtualenv和创建django项目

    一.由于一直在Linux环境下开发,想了解一下winPython开发环境: 1.打开cmd,pip install virtualenv 2.virtualenv test 由于这样需要进入到目录下才 ...

  2. linux4.1.36 2440 启用 RTC 支持

    /drivers/rtc/rtc-s3c.c822行static struct platform_driver s3c_rtc_driver = {    .probe        = s3c_rt ...

  3. MATLAB神经网络(4) 神经网络遗传算法函数极值寻优——非线性函数极值寻优

    4.1 案例背景 \[y = {x_1}^2 + {x_2}^2\] 4.2 模型建立 神经网络训练拟合根据寻优函数的特点构建合适的BP神经网络,用非线性函数的输入输出数据训练BP神经网络,训练后的B ...

  4. php中的进程

    pcntl扩展:主要的进程扩展,完成进程创建于等待操作. posix扩展:完成posix兼容机通用api,如获取进程id,杀死进程等. sysvmsg扩展:实现system v方式的进程间通信之消息队 ...

  5. URL及short URL短网址

    URL,uniform resource locator,经常被称为网址,尤其是在使用HTTP的时候.通常是一个指向某个资源的字符串.   URLs经常被用于网页(http),但也可以用于文件传输(f ...

  6. Array.isArray() 判断是不是数组

    var arr = new Array(); if(Array.isArray()){ console.log('yes') } else { conssole.log('no') }

  7. GO系列 | 5分钟入门GO【译】

    什么是Google Go? Google Go是由Robert Griesmer,Rob Pike和Ken Thompson在Google设计的一种开源编程语言. Go在语法上类似于C语言: 除了内存 ...

  8. Oracle - 各类文件损坏处理办法(附实验步骤)

    一.概述 本文将给大家介绍oracle各类文件损坏的现象和应对策略,请注意所有的恢复都是基于有备份的情况,所以请开启数据库的日常备份.文章将从以下文件展开 a. 密码文件 b. 参数文件 c. 控制文 ...

  9. [BUG]excel复制到input含有不可见内容(零宽字符)

    现象 excel手机号复制到input框子, length长度和可见长度不一致. "‭176xxxx1115‬" 长度是 13 而不是 11. 原因 手机号前后被 excel 插入 ...

  10. vue 模板 template init

    <template> <div> </div> </template> <script> export default { name: '模 ...