报错:

The following packages have unmet dependencies:
 vim : Depends: libpython3.5 (>= 3.5.0~b1) but it is not going to be installed
       Depends: libtinfo5 (>= 6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
安装vim时候出现的错误

经过网上一度的查阅,所有博文都是一样,先卸 sudo apt-get remove vim-common(前提是报错含有)再sudo apt-get -f install接着更新sudo apt-get update,这个方法本人操作不可行。

经过研究后,报错写着说明容器内缺少依赖,按照提示安装需要的依赖即可,之后可能还会提示缺少其他的依赖,提示缺少什么,安装什么即可.

解决方法:

sudo su进入root模式

apt-get install libtinfo5  

接着可能会出现如下错误

WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  sysvinit
26 upgraded, 63 newly installed, 6 to remove and 292 not upgraded.
Need to get 14.3 MB/15.0 MB of archives.
After this operation, 21.1 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] 

只需要输入如下即可:

Yes, do as I say!

接着安装另一个:

apt-get install libpython3.5

随后即可安装vim

apt-get install vim

如果提示: E: Unable to locate package vim
这个错误则需要更新一下下载源后即可安装.

推荐更新阿里云

如果您是arm架构使用此  arm架构 阿里云源

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐