gem install libyajl2 failure in Vagrant
If you get an error from libyajl2 when installing it on a brand new vagrant ubuntu image, don't be surprised:
root@cloudbees-chef:/home/vagrant# /opt/chef/embedded/bin/gem install libyajl2 Building native extensions. This could take a while... ERROR: Error installing libyajl2: ERROR: Failed to build gem native extension.
/opt/chef/embedded/bin/ruby extconf.rb creating Makefile /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/libyajl2-1.2.0/ext/libyajl2 extconf.rb:104:in `makemakefiles': unhandled exception from extconf.rb:138:in `<main>'
Gem files will remain installed in /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/libyajl2-1.2.0 for inspection. Results logged to /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/libyajl2-1.2.0/ext/libyajl2/gem_make.out
The solution is to install make. This error message is a bit stupid, but it means you don't have make or gcc. In our case, a default ubuntu server does not have make installed, so do it via:
apt-get install make









