我在 Windows 上通过 gem install 安装 json 时遇到了这个问题,错误消息是:
C:\DevKit>gem install json --platform=ruby --version=1.4.6
Fetching: json-1.4.6.gem (100%)Fetching: json-1.4.6.gem
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
generator.c:321:13: warning: 'fbuffer_free_only_buffer' defined but not used
linking shared-object json/ext/generator.so
c:/devkit/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lmsvcrt-ruby191
collect2: ld returned 1 exit status
make: *** [generator.so] Error 1
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.4.6 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json- 1.4.6/ext/json/ext/generator/gem_make.out
还有whatis -lmsvcrt-ruby191,那是ruby的库吗?从它说的错误消息中找不到-lmsvcrt-ruby191,那是主要犯罪吗?
我安装 json,因为我想确保 DevKit 安装成功。
有谁能够帮我?