解决apt-get安装vim安装不上的方法

  介绍

不懂解决apt-get安装vim安装不上的方法?其实想解决这个问题也不难、下面让小编带着大家一起学习怎么去解决,希望大家阅读完这篇文章后大所收获。

<强> apt-get安装vim安装不上怎么办?

vim安装不上的可能原因有:

    <李>

    权限不足

    <李>

    安装源里没有可用的包

    <李>

    vim-common的依赖问题

<强>解决方法如下:

<强>方法一:加上sudo来执行安装命令

sudo  apt-get  install  vim

<强>方法二:更换安装源

(1)在终端输入下面命令

sudo  gedit /etc/恰当的来源。列表

该命令的作用是用中打开安装来源文件

(2)替换为下面内容

# deb包   deb  http://mirrors.aliyun.com/ubuntu/  xenial  main  restricted  universe 多元宇宙   deb  http://mirrors.aliyun.com/ubuntu/  xenial-security  main  restricted  universe 多元宇宙   deb  http://mirrors.aliyun.com/ubuntu/  xenial-updates  main  restricted  universe 多元宇宙   deb  http://mirrors.aliyun.com/ubuntu/  xenial-backports  main  restricted  universe 多元宇宙   # #测试版源,,   deb  http://mirrors.aliyun.com/ubuntu/  xenial-proposed  main  restricted  universe 多元宇宙   #,源码,,   deb-src  http://mirrors.aliyun.com/ubuntu/  xenial  main  restricted  universe 多元宇宙   deb-src  http://mirrors.aliyun.com/ubuntu/  xenial-security  main  restricted  universe 多元宇宙   deb-src  http://mirrors.aliyun.com/ubuntu/  xenial-updates  main  restricted  universe 多元宇宙   deb-src  http://mirrors.aliyun.com/ubuntu/  xenial-backports  main  restricted  universe 多元宇宙   # #测试版源,,   deb-src  http://mirrors.aliyun.com/ubuntu/  xenial-proposed  main  restricted  universe 多元宇宙   #,Canonical 合作伙伴和附加,,   deb  http://archive.canonical.com/ubuntu/  xenial 合作伙伴   deb  http://extras.ubuntu.com/ubuntu/  xenial 主要

(3)执行

sudo  apt-get 更新   sudo  apt-get  install  vim

<强>方法三:强卸载依赖包

sudo  apt-get  remove  vim-common   sudo  apt-get  install  vim

解决apt-get安装vim安装不上的方法