Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am using Vagrant to test my Chef recipes in Amazon AWS, and I am encountering an irritating issue:

I initially assumed that Vagrant would install chef itself (as it does when using Virtual Box as the provider) but it seems that this needs to be done using the cloud-init script. However, even after I successfully installed the chef gem via cloud-init I was still getting the following error:

The chef binary (eitherchef-soloorchef-client) was not found

A quick google of this error suggested three probable causes:

  • Chef had failed to install
  • It had installed, but the directory was not in the $PATH environment variable
  • It had installed and in the $PATH but with incorrect permissions

I logged in and double checked; chef-solo and chef-client were installed; The path variable for the user, sudo and root all included /usr/local/bin and permissions were all fine.

I managed to solve this problem by uninstalling and reinstalling the gem using sudo gem install chef. I don't understand why this should resolve the issue and it is a bit of a problem if I have to ssh into a test box and manually install the gem every time.

Does anyone have any suggestions why this might be happening?

share|improve this question
up vote 2 down vote accepted

I wouldn't install chef-client via the gem.

Opscode recommends installing via their "omnibus" installer.

A handy way to do this, via a Vagrant plugin is vagrant-omnibus supports several provisioners, including vagrant-aws, and also supports a bunch of different distributions.

It's generally as easy as:

$ vagrant plugin install vagrant-omnibus and adding a line of configuration to your Vagrantfile,

share|improve this answer

Got the same problem here... for the time being I fixed it running:

vagrant ssh -c 'sudo ln -s /opt/chef/bin/* /usr/local/bin/'

But that is a crappy solution... I hope find something better as soon as I got some time.

share|improve this answer
BTW, please, somebody vote negative my own answer! is crappy :) – Keymon Sep 20 '13 at 16:39

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.