我试图在 Windows 7 x64 上安装 bzip2-ruby gem。现在我不知道这个 gem 是否可以在 64 位 Windows 上运行。我确实安装了安装到 C:\Program Files (x86)\GnuWin32 的 bzip2。
当我去安装时,运行以下命令:
gem install bzip2-ruby -- --with-bz2-dir="C:\Program Files (x86)\GnuWin32\"
当它运行时,我得到以下输出:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
*** 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:/Ruby193/bin/ruby
--with-bz2-dir
--with-bz2-include
--without-bz2-include=${bz2-dir}/include
--with-bz2-lib
--without-bz2-lib=${bz2-dir}/lib
--with-bz2lib
--without-bz2lib
ERROR: Error installing bzip2-ruby:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --with-bz2-dir=C:\Program Files (x86)\GnuWin32"
checking for bzlib.h... no
checking for BZ2_bzWriteOpen() in -lbz2... no
libbz2 not found, maybe try manually specifying --with-bz2-dir to find it?
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/bzip2-ruby-0.2.7 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/bzip2-ruby-0.2.7/ext/gem_make.out
我可以验证 libbz2.a、libbz2.def 和 libbz2.dll.a 文件是否存在于上述路径的 lib 文件夹中。
运行命令以指定 lib 文件夹时,我只是缺少一个额外的选项吗?
谢谢!