aptgetinstallvim安装不上怎么办?
apt-get install vim安装不上怎么办?
vim安装不上的可能原因有:
权限不足
安装源里没有可用的包
vim-common的依赖问题
解决方法如下:
方法一:加上sudo来执行安装命令
sudo apt-get install vim
方法二:更换安装源
(1)在终端输入下面命令
sudo gedit /etc/apt/sources.list
该命令的作用是用gedit打开安装来源文件
(2)替换为下面内容
#deb包deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
(3)执行
sudo apt-get updatesudo apt-get install vim
方法三:卸载依赖包
sudo apt-get remove vim-commonsudo apt-get install vim
以上是 aptgetinstallvim安装不上怎么办? 的全部内容, 来源链接: utcz.com/z/540789.html