Problem scenario
You have Ubuntu 14.04 or 16.x, and you want to install Vagrant 1.x. (If you have Ubuntu 16.0x or higher and want to install Vagrant 2.x, go to the very bottom.) How do you do it?
Solution
1. Run this command: sudo find / -name sources.list #find the file that governs Debian packages
3. Ignore /usr/share/doc/apt/examples/sources.list. Make a copy of the other sources.list as a back up (in case you need to rollback).
4. Modify one sources.list file (not /usr/share/doc/apt/examples/sources.list) to include these stanzas (from "#Universe Repos" to "...trusty-updates universe") in addition to whatever else was already in the file:
# Universe Repos
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe
###### Ubuntu Update Repos Universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe
5. After you save the changes to sources.list, run these commands:
sudo apt-get -y update
sudo apt-get -y install vagrant
6. To confirm installation, run this command: vagrant version
End of this solution.
==================================================================================
Problem scenario
How do you install Vagrant 2.x on Ubuntu 16.x or higher?
Solution
Run these commands:
curl https://releases.hashicorp.com/vagrant/2.0.3/vagrant_2.0.3_x86_64.deb > /tmp/vagrant_2.0.3_x86_64.deb
sudo dpkg -i /tmp/vagrant_2.0.3_x86_64.deb