Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've already installed VirtualBox version 4.1.18_Ubuntu from this source:

deb quantal contrib

Apparently the above source was used to install VirtualBox 4.2 which was automatically removed when I installed the vagrant. So, I suppose that the current installed version is from the default Ubuntu source.

When I installed the vagrant (from the default Ubuntu 12.10 source) and tried to run my box with vagrant up I got this error message:

Vagrant has detected that you have a version of VirtualBox installed
that is not supported. Please install one of the supported versions
listed below to use Vagrant:

4.0, 4.1

Is there any way to run vagrant with my VirtualBox? Installing newest vagrant version could be also as a solution (the current one: 1.0.3).

I tried: sudo apt-get purge virtualbox* virtualbox-4.2 vagrant and sudo apt-get install vagrant, it didn't help.

share|improve this question
You installed VirtualBox for 12.04, and vagrant for 12.10. Don't you want to use a compatible version? Or was that a typo? – pcm Jun 13 '13 at 23:59
Just changed the source to: deb quantal contrib apt-get update && apt-get upgrade - Nothing changed. The version of VB remain the same, and the error message is too. Thanks any way. – Kostanos Jun 14 '13 at 0:26
To know the version of VirtualBox, run dpkg -l | grep virtualbox – ignis Jun 14 '13 at 13:39
Already tried with 4.1.18_Ubuntu, 4.2 and now I'm installing 4.1 from source. Will see what happens – Kostanos Jun 14 '13 at 14:11
Use dpkg and report on both VirtualBox and vagrant versions. FYI, I tried on a ubuntu 12.04 32 bit machine with VirtualBox 4.2. Doing apt-get install of vagrant, uninstalled VirtualBox 4.2. When all done, I ended up with vagrant 1.0.1-1 and VirtualBox 4.1.12. I did an init for precise32 and then up. Maybe you could remove VirtualBox and install vagrant and let it pick the matching VirtualBox? – pcm Jun 15 '13 at 23:37
up vote 2 down vote accepted

To solve this same problem, I purged the Ubuntu virtualbox packages, and added lines to /etc/apt/sources.list

deb quantal contrib

Update the apt listings:

sudo apt-get update

Install the headers for your kernel if they're not installed (because virtualbox install needs them):

sudo apt-get install linux-headers-$(uname -r)

Install virtualbox:

sudo apt-get install virtualbox-4.2

Download and install the latest .deb for vagrant, and all works.

share|improve this answer
+1 and thanks it saved my time – Abhishek Dec 26 '15 at 11:27

There are a few issues here that making this confusing:

  • VirtualBox packages from the Ubuntu repository have different names to the packages from the Oracle repository.
  • When you install a package, Ubuntu automatically installs additional recommended packages unless you specify the --no-install-recommends option.
  • There is a bug affecting the Vagrant package which means it replaces the Oracle VirtualBox packages with the Ubuntu packages when installed.

I suggest that you:

  1. Purge all your Vagrant and VirtualBox packages as you describe in your question.
  2. Install the latest Oracle VirtualBox package as you did originally.
  3. Install the latest Vagrant package from, paying attention to which additional packages it tries to install or remove, and specifying --no-install-recommends if necessary.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.