I was frustrated trying to install and run Laravel Homestead on a freshly baked Ubuntu 16.04 in the office.

Following the guide from the official docs I was unable to start up the vagrant box and the error I was receiving was this:Starting Homestead on VirtualBox using "vagrant up" error

➜  Homestead git:(a1bcbde) vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Importing base box 'laravel/homestead'...
==> homestead-7: Matching MAC address for NAT networking...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Inappropriate ioctl for devic
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 71 of file VBoxManageHostonly.cpp

 

After couple of hours installing/swapping/removing the latest versions with some older ones of both VirtualBox and Vagrant (each downloaded from their official websites) the solution for me was to grab VirtualBox from the ubuntu repo

sudo apt-get install virtualbox

And voilà – I was able to run everything after that.