<div dir="ltr"><div>Hi,</div>I have installed libvirt via <a href="https://github.com/Homebrew/homebrew/blob/master/Library/Formula/libvirt.rb">Homebrew = compiled from source</a>.<div><br></div><div>Then I wanted to install <b>ruby-libvirt</b></div>

<div><br></div><div><font face="courier new, monospace">gem install ruby-libvirt</font></div><div><br></div><div>and end up with this error:</div><div><br></div><div><div><font face="courier new, monospace" size="1">/usr/local/Cellar/ruby/2.1.2_3/bin/ruby extconf.rb</font></div>

<div><font face="courier new, monospace" size="1">*** extconf.rb failed ***</font></div><div><font face="courier new, monospace" size="1">Could not create Makefile due to some reason, probably lack of necessary</font></div>

<div><font face="courier new, monospace" size="1">libraries and/or headers.  Check the mkmf.log file for more details.  You may</font></div><div><font face="courier new, monospace" size="1">need configuration options.</font></div>

<div><font face="courier new, monospace" size="1"><br></font></div><div><font face="courier new, monospace" size="1">Provided configuration options:</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">      </span>--with-opt-dir</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--with-opt-include</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--without-opt-include=${opt-dir}/include</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--with-opt-lib</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre"> </span>--without-opt-lib=${opt-dir}/lib</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--with-make-prog</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">       </span>--without-make-prog</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--srcdir=.</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--curdir</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--ruby=/usr/local/Cellar/ruby/2.1.2_3/bin/ruby</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre"> </span>--with-libvirt-include</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--without-libvirt-include</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">      </span>--with-libvirt-lib</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--without-libvirt-lib</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">  </span>--with-libvirt-config</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--without-libvirt-config</font></div><div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">       </span>--with-pkg-config</font></div>

<div><font face="courier new, monospace" size="1"><span class="" style="white-space:pre">     </span>--without-pkg-config</font></div><div><font face="courier new, monospace" size="1">extconf.rb:73:in `<main>': libvirt library not found in default locations (RuntimeError)</font></div>

<div><font face="courier new, monospace" size="1"><br></font></div><div><font face="courier new, monospace" size="1">extconf failed, exit code 1</font></div><div><br></div><div>so then I passed the locations of <b><font face="courier new, monospace">include</font></b> & <b><font face="courier new, monospace">lib</font></b> directories as the configuration options:</div>

<div><br></div><div><font face="courier new, monospace">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</font><br></div><div>

<br></div><div>which <b>worked</b>, but it's not very clean and effective solution, especially if you have <b>ruby-libvirt</b> as a requirement in your Gemfile and you need to install it via Bundler.</div><div><br></div>

<div>I reckon that a possible solution would be to change Homebrew formula, so that it either installs or symlinks both dirs into locations where <b>ruby-libvirt</b> will look for it, but <b><u>what's the default location actually</u></b>?</div>

<div><br></div><div><div dir="ltr">-- <br><b>Radek Simko<br></b><div></div></div></div>
</div></div>