debian8 安装Vim

默认的debian是没有安装Vim的,网上的一些文章有些地方不太适用,按照如下方法尝试成功:

 

操作前做好相应备份

# mv /etc/apt/sources.list /etc/apt/sources.list.bak
  • 1

以Jessie为例,编辑/etc/apt/sources.list文件

# vim /etc/apt/sources.list

# 在文件最前面,添加以下条目
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

更新软件源

apt-get update

然后执行:

sudo apt-get install vim


成功


没有更多推荐了,返回首页