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
/users/ankmaheshwari/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/yaml.rb:56:in
`<top (required)>’:
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
Building native extensions. This could take a while…
ERROR: Error installing ruby-libvirt:
ERROR: Failed to build gem native extension.

    /users/ankmaheshwari/.rvm/rubies/ruby-1.9.3-p194/bin/ruby

extconf.rb
*** 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:
–with-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=/users/ankmaheshwari/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
–with-_libvirt-dir
–without-_libvirt-dir
–with-_libvirt-include
–without-_libvirt-include=${_libvirt-dir}/include
–with-_libvirt-lib
–without-_libvirt-lib=${_libvirt-dir}/lib
–with-libvirt-config
–without-libvirt-config
–with-pkg-config
–without-pkg-config
extconf.rb:53:in `’: libvirt not found (RuntimeError)

Gem files will remain installed in
/users/ankmaheshwari/.rvm/gems/ruby-1.9.3-p194/gems/ruby-libvirt-0.3.0
for inspection.
Results logged to
/users/ankmaheshwari/.rvm/gems/ruby-1.9.3-p194/gems/ruby-libvirt-0.3.0/ext/libvirt/gem_make.out
ncepspa244%

So please help me out to resole these issues…

Hi!

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.

Arun.