How to install the latest version of Vagrant
I have downloaded the vagrant 2.2.9 64 bit setup file from Downloads | Vagrant. It is not a .deb file, it does not have any extension so I can not understand how can I install vagrant using this file. It only shows exec in green letters in the file icon.
How can I install vagrant in my ubuntu 18.04.4 using this file? Or is there any other way to install the latest version of Vagrant?
72 Answers
- Download the Debian package (not the generic Linux zipfile)
Look in your Downloads directory for the exact filename. Mine was
vagrant_2.2.9_x86_64.debyour filename may vary.Install. Recall that the file is in the Downloads directory, and use the correct filename. On mine it's:
sudo apt install ~/Downloads/vagrant_2.2.9_x86_64.deb
Automate the process with a simple script below:
#!/bin/bash
cd /tmp
export VERSION=$(curl -s | jq ".[0].name" | cut -c 3-8)
curl -O
chmod 755 vagrant_$(echo $VERSION)_x86_64.deb
sudo apt install ./\vagrant_$(echo $VERSION)_x86_64.deb
rm -f vagrant_$(echo $VERSION)_x86_64.debThe code will install the latest version of Vagrant.