title: Installing libbzip2 on Windows
body: <p>I am trying to install libbzip2 on Windows 7. (Actually I want to install <code>wp2txt</code> package, but it seems need to libbzip2). I installed "Bzip2 for Windows" as suggested by Alex. But I get following errors. </p>
  
  <pre><code>C:\Users\John&gt;gem install bzip2-ruby -- --with-bz2-include="C:\Program Files (x86)\GnuWin32\include" -- --with-bz2-lib="C:\Program Files (x86)\GnuWin32\lib"
  Temporarily enhancing PATH to include DevKit...
  Building native extensions.  This could take a while...
  ERROR:  Error installing bzip2-ruby:
          ERROR: Failed to build gem native extension.
  
          C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb --with-bz2-include=C:\Program Files (x86)\GnuWin32\include -- --with-bz2-lib=C:\Program Files (x86)\GnuWin32\lib
  checking for bzlib.h... no
  checking for BZ2_bzWriteOpen() in -lbz2... no
  *** 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
          --without-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=C:/RailsInstaller/Ruby1.9.3/bin/ruby
          --with-bz2-dir
          --without-bz2-dir
          --with-bz2-include=${bz2-dir}/include
          --with-bz2-lib=${bz2-dir}/lib
          --with-bz2lib
          --without-bz2lib
  libbz2 not found, maybe try manually specifying --with-bz2-dir to find it?
  
  
  Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bzip2-ruby-0.2.7 for inspection.
  Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bzip2-ruby-0.2.7/ext/gem_make.out
  </code></pre>