When doing Linux work, I accidentally removed the vi environment and reinstalled it with various 404s, probably because ubuntu had not been updated for a long time and the software source had moved.
So.
sudo apt-get update
sudo apt-get install vim
At this point, I found that the installation was not successful
Maybe it’s a problem with sources.list, /etc/apt/sources.list is a file that stores the server addresses of third-party software sources. After this problem, I did some operations according to the online tutorials, and it seems that I accidentally lost the sources.list, and then I couldn’t even see the details page after finding vim in the software center.
So re-check.
Check the contents of your sources.list file sudo gedit/etc/apt/sources.list (you can only use gedit because you don’t have a vi environment) because there is no such file so the contents are empty.
Replace (or add) the following and save
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
5. sudo apt-get update
6.sudo apt-get install vim
Done!
Similar Posts:
- [Solved] Ubuntu sudo apt-get update Warning: Failed to fetch
- apt-get: Could not resolve ‘archive.ubuntu.com’
- System update error: no_PUBKEY [How to Solve]
- Ubuntu Error: E: “cdrom://Ubuntu 18.04.5 LTS _Bionic Beaver_ – Release amd64 (20200806.1) bionic Release” E: “http://ppa.launchpad.net/zarquon42/meshlab/ubuntu bionic Release”
- ProXmoX VE Update apt-get update Error [How to Solve]
- Install wechat, chrome, etc. on Ubuntu 16.04
- Docker-compose up -d nginx Error: Unable to find expected entry… [How to Solve]
- Installing ncurses devel in Ubuntu 10.10
- Temporary failure in name resolution solution when Ubuntu installs essential (GCC)
- [Solved] docker: Error response from daemon: could not select device driver “” with capabilities: [[gpu]].