Installation of ruby-Libvirt on Linux box

Hey guys,
I am facing some issues while installing ruby-libvirt gem on
my linux box.
these issues are as follows.

ncepspa244% gem install ruby-libvirt -v 0.3.0
`<top (required)>’:
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
Building native extensions. This could take a while…
ERROR: Error installing ruby-libvirt:
ERROR: Failed to build gem native extension.


*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
extconf.rb:53:in `’: libvirt not found (RuntimeError)

Gem files will remain installed in
for inspection.
Results logged to

So please help me out to resole these issues…


This error usually means that you’ve not installed the development
libraries. so in your case if it’s centos system it would be
“libvirt-devel”. if you are on debian based system just search for the
development library, and install it.