2018-04-23 12:56:06 -07:00
|
|
|
# Dependency installation steps for Debian GNU/Linux 9.x (stretch)
|
|
|
|
|
|
|
|
This document assumes you are starting from a fresh install of Debian in the 9.x series.
|
|
|
|
|
2019-03-21 10:55:15 -07:00
|
|
|
Most recently tested 2019-03-21 with the following debian release:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
|
|
|
$ lsb_release --description
|
2019-03-21 10:55:15 -07:00
|
|
|
Description: Debian GNU/Linux 9.8 (stretch)
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
# Install VirtualBox
|
2018-04-23 12:56:06 -07:00
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
Virtualbox is the configured VM provider in this project's Vagrantfile.
|
2018-04-23 12:56:06 -07:00
|
|
|
|
2019-06-12 16:15:58 -07:00
|
|
|
First, check whether virtualbox is installed. Some systems may have it already:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ virtualbox --help
|
|
|
|
Oracle VM VirtualBox VM Selector v6.0.4
|
|
|
|
[...]
|
|
|
|
```
|
|
|
|
|
|
|
|
(If it is installed, you can probably skip this step. Note that virtualbox installs linux kernel
|
|
|
|
modules which need to be kept in sync with the virtualbox apt package, so if you decide to change to
|
|
|
|
a different version, be sure to uninstall completely (including the kernel modules) before
|
|
|
|
reinstalling.)
|
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
Add Oracle's VirtualBox apt repository to your system's apt sources:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
2019-02-24 14:23:23 -08:00
|
|
|
sudo apt-add-repository "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib"
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
Verify that the source was added:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ grep -iR virtualbox /etc/apt/sources.list*
|
|
|
|
/etc/apt/sources.list:deb http://download.virtualbox.org/virtualbox/debian stretch contrib
|
|
|
|
/etc/apt/sources.list:# deb-src http://download.virtualbox.org/virtualbox/debian stretch contrib
|
|
|
|
```
|
2018-04-23 12:56:06 -07:00
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
Download and register the public gpg key used by Oracle to secure the above
|
|
|
|
repository:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
2019-02-24 14:23:23 -08:00
|
|
|
$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
|
|
|
|
OK
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
Verify that the key was added
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
2019-02-24 14:23:23 -08:00
|
|
|
$ apt-key list "B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF"
|
|
|
|
pub rsa4096 2016-04-22 [SC]
|
|
|
|
B9F8 D658 297A F3EF C18D 5CDF A2F6 83C5 2980 AECF
|
|
|
|
uid [ unknown] Oracle Corporation (VirtualBox archive signing key) <info@virtualbox.org>
|
|
|
|
sub rsa4096 2016-04-22 [E]
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
Update your local apt package metadata
|
2018-04-23 12:56:06 -07:00
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
```
|
|
|
|
$ sudo apt update
|
|
|
|
[...]
|
|
|
|
```
|
2018-04-23 12:56:06 -07:00
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
This command will show the available versions of virtualbox from the apt
|
|
|
|
repository:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
```
|
|
|
|
$ sudo apt install virtualbox
|
|
|
|
Reading package lists... Done
|
|
|
|
Building dependency tree
|
|
|
|
Reading state information... Done
|
|
|
|
Package virtualbox is a virtual package provided by:
|
|
|
|
virtualbox-6.0 6.0.4-128413~Debian~stretch
|
|
|
|
virtualbox-5.2 5.2.26-128414~Debian~stretch
|
|
|
|
virtualbox-5.1 5.1.38-122592~Debian~stretch
|
|
|
|
virtualbox-5.0 5.0.40-115130~Debian~stretch
|
|
|
|
You should explicitly select one to install.
|
|
|
|
|
|
|
|
E: Package 'virtualbox' has no installation candidate
|
|
|
|
```
|
|
|
|
|
|
|
|
Decide on the version you want and specify the version number to install it:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
2019-02-24 14:23:23 -08:00
|
|
|
$ sudo apt install virtualbox-6.0 -y
|
|
|
|
[...]
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
2019-02-24 14:23:23 -08:00
|
|
|
Source: https://www.virtualbox.org/wiki/Linux_Downloads#Debian-basedLinuxdistributions
|
|
|
|
|
2019-03-21 10:55:15 -07:00
|
|
|
Most recently tested 2019-03-21 with the following virtualbox release:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
|
|
|
$ virtualbox --help
|
2019-02-24 14:23:23 -08:00
|
|
|
Oracle VM VirtualBox VM Selector v6.0.4
|
|
|
|
[...]
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Install git
|
|
|
|
|
|
|
|
```
|
2019-02-12 15:23:00 -08:00
|
|
|
$ sudo apt install git
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
2019-03-21 10:55:15 -07:00
|
|
|
Most recently tested 2019-03-21 with the following git release:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
|
|
|
$ git --version
|
|
|
|
git version 2.11.0
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-07 09:11:58 -07:00
|
|
|
# Install Vagrant 2.0.3 or higher
|
2018-04-23 12:56:06 -07:00
|
|
|
|
2018-05-07 09:14:01 -07:00
|
|
|
As of this writing, the Vagrant version that Debian uses in its "stretch" release is 1.9.x so we
|
|
|
|
suggest getting a package from Vagrant's web site:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
2019-03-21 10:55:15 -07:00
|
|
|
wget -c https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.deb
|
|
|
|
sudo dpkg -i vagrant_2.2.4_x86_64.deb
|
|
|
|
rm vagrant_2.2.4_x86_64.deb
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
2019-03-21 10:55:15 -07:00
|
|
|
Most recently tested 2019-03-21 with the following vagrant release:
|
2018-04-23 12:56:06 -07:00
|
|
|
|
|
|
|
```
|
|
|
|
$ vagrant --version
|
2019-03-21 10:55:15 -07:00
|
|
|
Vagrant 2.2.4
|
2018-04-23 12:56:06 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-21 13:31:29 -07:00
|
|
|
# Install venv support
|
|
|
|
|
|
|
|
`venv` is a python module used to create isolated project-specific environments, so that projects on
|
|
|
|
the same computer can each use their own version of the python executable and their own set of
|
|
|
|
installed python modules.
|
|
|
|
|
|
|
|
`python3-venv` is an `apt` package that includes support for using the `venv` python module.
|
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt install python3-venv
|
|
|
|
```
|
|
|
|
|
|
|
|
Most recently tested 2019-03-05 with the following python3-venv release:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ dpkg --status python3-venv | grep Version
|
|
|
|
Version: 3.5.3-1
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-03-21 11:34:44 -07:00
|
|
|
# Install direnv (Optional/Recommended)
|
|
|
|
|
|
|
|
This tool sets and unsets environment variables as you change directories in a shell session,
|
2019-03-28 22:51:30 -07:00
|
|
|
providing a convenient facility for setting up project-specific configuration.
|
2019-03-21 11:34:44 -07:00
|
|
|
|
|
|
|
```
|
|
|
|
sudo apt install direnv
|
|
|
|
```
|
|
|
|
|
|
|
|
To activate direnv when starting bash (the default shell on Debian 9), add the following line to the
|
|
|
|
end of `~/.bashrc`:
|
|
|
|
|
|
|
|
```
|
|
|
|
eval "$(direnv hook bash)"
|
|
|
|
```
|
|
|
|
|
|
|
|
direnv works by incorporating a call to `_direnv_hook` in the `PROMPT_COMMAND` shell variable. You
|
|
|
|
can check that this was done by starting a new bash session and checking whether that value is
|
|
|
|
present:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ echo $PROMPT_COMMAND
|
|
|
|
_direnv_hook;
|
|
|
|
```
|
|
|
|
|
|
|
|
direnv also supports several other shells -- zsh, fish, tcsh, and elvish as of this writing. Its
|
|
|
|
website includes instructions for enabling each of the shells it supports.
|
|
|
|
|
|
|
|
Most recently tested 2019-03-21 with the following direnv release:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ direnv --help
|
|
|
|
direnv v2.10.0
|
|
|
|
[...]
|
|
|
|
```
|