Hi,
I have installed libvirt via Homebrew = compiled from source
<
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/libvirt....
.
Then I wanted to install *ruby-libvirt*
gem install ruby-libvirt
and end up with this error:
/usr/local/Cellar/ruby/2.1.2_3/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=/usr/local/Cellar/ruby/2.1.2_3/bin/ruby
--with-libvirt-include
--without-libvirt-include
--with-libvirt-lib
--without-libvirt-lib
--with-libvirt-config
--without-libvirt-config
--with-pkg-config
--without-pkg-config
extconf.rb:73:in `<main>': libvirt library not found in default locations
(RuntimeError)
extconf failed, exit code 1
so then I passed the locations of *include* & *lib* directories as the
configuration options:
gem install ruby-libvirt --
--with-libvirt-include=/usr/local/Cellar/libvirt/1.2.7/include
--with-libvirt-lib=/usr/local/Cellar/libvirt/1.2.7/lib
which *worked*, but it's not very clean and effective solution, especially
if you have *ruby-libvirt* as a requirement in your Gemfile and you need to
install it via Bundler.
I reckon that a possible solution would be to change Homebrew formula, so
that it either installs or symlinks both dirs into locations where
*ruby-libvirt* will look for it, but *what's the default location actually*?
--
*Radek Simko*