centos源码安装gitlab,已经安装mysql,在安装gem的时候使用
sudo -u git -H bundle install --deployment --without development test postgres aws
An error occurred while installing json (1.8.1), and Bundler cannot continue. Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
gem install json -v '1.8.1'
Fetching: json-1.8.1.gem (100%) Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. current directory: /usr/local/lib/ruby/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator /usr/local/bin/ruby -r ./siteconf20160119-1952-glgiso.rb extconf.rb creating Makefile current directory: /usr/local/lib/ruby/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator make "DESTDIR=" clean current directory: /usr/local/lib/ruby/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator make "DESTDIR=" compiling generator.c In file included from generator.c:1: ../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given In file included from generator.c:1: ../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’: ../fbuffer/fbuffer.h:175: warning: initialization makes integer from pointer without a cast make: *** [generator.o] Error 1 make failed, exit code 2 Gem files will remain installed in /usr/local/lib/ruby/gems/2.3.0/gems/json-1.8.1 for inspection. Results logged to /usr/local/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0-static/json-1.8.1/gem_make.out
嘿嘿,找到办法了!就是
[root@test48gitlab]#vimGemfile.lock版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。