Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker-machine:Error with pre-create check: "exit status 126"

When I'm type the code sudo docker-machine create --driver virtualbox default to create a new virtual machine. It can not worked. Here is the info:

xxxMacBook-Pro:~ xxx$ docker --version
Docker version 1.12.0, build 8eab29e
xxxMacBook-Pro:~ xxx$ docker-machine --version
docker-machine version 0.8.0, build b85aac1
xxxMacBook-Pro:~ xxx$ sudo docker-machine create --driver virtualbox default
Running pre-create checks...
Error with pre-create check: "exit status 126"

Please help me to figure this out.

like image 502
user2269774 Avatar asked Aug 01 '16 10:08

user2269774


1 Answers

Exit status 126 on a Mac indicates that you don't have Virtualbox installed, which comes separate from Docker.

Run the following command to install it:

brew cask install virtualbox;

Now you can gracefully run your command again.

NB: You don't have to use sudo, unless there are some special privileges you want to accord whatever you are creating.

Update: As of 2021 you can use

brew install --cask virtualbox
like image 88
Kaka Ruto Avatar answered Oct 08 '22 19:10

Kaka Ruto