2017-10-13 147 views
0

我已经在这几个小时已经搜索了一切。试了很多答案,即时通讯使用红宝石x64和devkit x64(originaly isntalled一个x32,但我刚刚删除它,并安装了正确的一个x64) 无法安装json或(我的实际目标)ruby-debug-ide -v 0.4。 32 宝石版本2.4.7 =红宝石 版本=红宝石2.4.2p198(2017年9月14日修订59899)[64-的mingw32]无法安装宝石文件

C:\WINDOWS\system32>gem install json 
Building native extensions. This could take a while... 
ERROR: Error installing json: 
     ERROR: Failed to build gem native extension. 

    C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171013-12212-1y42085.rb extconf.rb 
creating Makefile 

make "DESTDIR=" clean 

make "DESTDIR=" 
generating generator-x64-mingw32.def 
compiling generator.c 
linking shared-object json/ext/generator.so 
c:/ruby24-x64/programing/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp 
collect2.exe: error: ld returned 1 exit status 
make: *** [generator.so] Error 1 

make failed, exit code 2 

Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/json-2.1.0 for inspection. 
Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/json-2.1.0/gem_make.out 
+0

看起来它缺少GMP库,或者任何提供库'gmp'的东西。当有内置[JSON库](https://ruby-doc.org/stdlib-2.4.1/libdoc/json/rdoc/JSON.html)时,是否有任何理由需要使用gem? – tadman

回答