msenkpiel
4/28/2013 - 8:43 AM

Vagrant curl Bad CPU Type on Core Duo OS X 10.6.8

Vagrant curl Bad CPU Type on Core Duo OS X 10.6.8

Vagrant comes with its own curl version at /Application/Vagrant/embedded/bin directory. This curl was compiled against a 64bit machine so you should replace it with a suitable version into your computer...

The stack trace for the error is:
Downloading or copying the box...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/subprocess.rb:84:in `rescue in execute': Bad CPU type in executable - curl (Vagrant::Util::Subprocess::LaunchError)
  from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/subprocess.rb:77:in `execute'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/subprocess.rb:23:in `execute'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/downloader.rb:122:in `block in download!'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/downloader.rb:121:in `download!'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/box_add.rb:39:in `call'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/box/command/add.rb:37:in `execute'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/box/command/root.rb:47:in `execute'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/cli.rb:46:in `execute'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:467:in `cli'
	from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:84:in `<top (required)>'
	from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
	from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

To solve this you should:

cd /Application/Vagrant/embedded/bin
mv curl curl.old
which curl
ln -s $(which curl) curl

Now you can run...

vagrant box add <box> <url>