Resolve the problem of vim installation failure in Ubuntu17.04 (source included)

Problem Description

Embedded developers should be the most familiar with vim, but have you ever encountered the problem that you need to install vim by yourself in the Ubuntu just installed and the installation always fails? I encountered it. The problem is shown in the picture below.
Problem map
Package vim is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source.
This problem can be directly located to the source, and it should be solved by updating the source.

problem solved

Command 1: sudo gedit /etc/apt/sources.list to  open the source file and paste the following contents to save.
Note: The Ubuntu version I use is 17.04. I tried a lot of sources. The following is a useful
deb http://mirrors .tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn /ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http:// mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua .edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe deb

Insert picture description here
Command two: sudo apt-get clean
Command three: sudo apt-get update The  process is long, wait patiently. . . . . .
Insert picture description here
Command four: sudo apt-get install vim  can be successful (I was successful anyway, hahaha) At
Insert picture description here
this time, knock vim again and see if it is OK
Insert picture description here

Guess you like

Origin blog.csdn.net/m0_38127906/article/details/107396124