gem install cocoapods
我得到了所有这些错误:
Building native extensions. This Could take a while...ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension. current directory: /usr/local/lib/ruby/gems/2.4.0/gems/Json-1.8.3/ext/Json/ext/generator/usr/local/opt/ruby/bin/ruby -r ./siteconf20161228-19158-1ru87yt.rb extconf.rbcreating Makefilecurrent directory: /usr/local/lib/ruby/gems/2.4.0/gems/Json-1.8.3/ext/Json/ext/generatormake "DESTDIR=" cleancurrent directory: /usr/local/lib/ruby/gems/2.4.0/gems/Json-1.8.3/ext/Json/ext/generatormake "DESTDIR="compiling generator.cgenerator.c:861:25: error: use of undeclared IDentifIEr 'rb_cFixnum' } else if (klass == rb_cFixnum) { ^generator.c:863:25: error: use of undeclared IDentifIEr 'rb_cBignum' } else if (klass == rb_cBignum) { ^generator.c:975:5: warning: division by zero is undefined [-Wdivision-by-zero] rb_scan_args(argc,argv,"01",&opts); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2143:9: note: expanded from macro 'rb_scan_args' rb_scan_args0(argc,argvp,fmt,\ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2329:8: note: expanded from macro 'rb_scan_args0' rb_scan_args_verify(fmt,varc),vars) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2201:11: note: expanded from macro 'rb_scan_args_verify' verify = rb_scan_args_verify_count(fmt,varc); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~note: (skipPing 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2167:6: note: expanded from macro 'rb_scan_args_count_hash' rb_scan_args_count_block(fmt,ofs,varc,vari) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2162:6: note: expanded from macro 'rb_scan_args_count_block' rb_scan_args_count_end(fmt,vari) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2158:12: note: expanded from macro 'rb_scan_args_count_end' ((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~generator.c:975:5: warning: division by zero is undefined [-Wdivision-by-zero] rb_scan_args(argc,vari) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2163:6: note: expanded from macro 'rb_scan_args_count_block' rb_scan_args_count_end(fmt,ofs+1,vari+1)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2158:12: note: expanded from macro 'rb_scan_args_count_end' ((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~generator.c:975:5: warning: division by zero is undefined [-Wdivision-by-zero] rb_scan_args(argc,varc); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~note: (skipPing 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2168:6: note: expanded from macro 'rb_scan_args_count_hash' rb_scan_args_count_block(fmt,vari+1)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2162:6: note: expanded from macro 'rb_scan_args_count_block' rb_scan_args_count_end(fmt,varc); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~note: (skipPing 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2167:6: note: expanded from macro 'rb_scan_args_count_hash' rb_scan_args_count_block(fmt,vari) : \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/usr/local/Cellar/ruby/2.4.0/include/ruby-2.4.0/ruby/ruby.h:2158:12: note: expanded from macro 'rb_scan_args_count_end' ((vari)/(!fmt[ofs] || rb_scan_args_bad_format(fmt))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~6 warnings and 2 errors generated.make: *** [generator.o] Error 1make Failed,exit code 2Gem files will remain installed in /usr/local/lib/ruby/gems/2.4.0/gems/Json-1.8.3 for inspection.Results logged to /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0/Json-1.8.3/gem_make.out
我一直在搜索,我找不到任何有关这些错误的信息.
我怎么解决这个问题?
解决方法 好像是 JSON 1.8.3 is not compatible with ruby 2.4..我认为他们现在正在解决这个问题.与此同时,我通过降级为ruby 2.3解决了类似的问题 总结以上是内存溢出为你收集整理的ios – 安装cocoapods时出错:json-1.8.3及更多错误全部内容,希望文章能够帮你解决ios – 安装cocoapods时出错:json-1.8.3及更多错误所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)