我是靠谱客的博主 能干大神,最近开发中收集的这篇文章主要介绍ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

The following packages have unmet dependencies: vim

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.

原因:更换为国内源出现这个错误,好像不更换出现别的错误。

阿里这个坑爹货,赶紧换源,换成清华的就没事了。

1.备份原始源文件source.list

桌面打开终端,执行命令:sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.修改源文件source.list

(1)终端执行命令:sudo chmod 777 /etc/apt/source.list更改文件权限使其可编辑;

(2)执行命令:sudo gedit /etc/apt/source.list打开文件进行编辑;

(3)删除原来的文件内容,复制下面内容到其中并保存;

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

参考:

https://www.cnblogs.com/masbay/p/10887571.html

最后

以上就是能干大神为你收集整理的ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common的全部内容,希望文章能够帮你解决ubuntu下Vim安装失败,报The following packages have unmet dependencies: vim : Depends: vim-common所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(64)

评论列表共有 0 条评论

立即
投稿
返回
顶部