我嘗試在Buddybuild的預生成步驟中安裝Fastlane。如何在Buddybuild上安裝Fastlane
我的預構建腳本是這樣的:
#!/bin/bash
if ! which fastlane >/dev/null; then
echo "Installing fastlane this may need sudo"
sudo gem install fastlane
else
echo "Updating fastlane this may need sudo"
sudo gem update fastlane
fi
我得到以下錯誤:
ERROR: Error installing fastlane:
ERROR: Failed to build gem native extension.
/usr/bin/ruby2.1 mkrf_conf.rb .
Building native extensions. This could take a while... /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:89:in `run': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError) .
/usr/bin/ruby2.1 extconf.rb .
mkmf.rb can't find header files for ruby at
/usr/lib/ruby/include/ruby.h extconf failed, exit code 1
我怎樣才能解決這個問題?
日誌
Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/gems/unf_ext-0.0.7.4 for inspection. Results logged to /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2/ext/gems/extensions/x86_64-linux/2.1.0/unf_ext-0.0.7.4/gem_make.out from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:38:in block in build from /usr/lib/ruby/2.1.0/tempfile.rb:324:in 'open' from /usr/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:17:in 'build' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in 'block (2 levels) in build_extension' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in 'chdir' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in 'block in build_extension' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in 'synchronize' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in 'block in build_extensions' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in 'each' from /usr/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in 'build_extensions' from /usr/lib/ruby/2.1.0/rubygems/installer.rb:677:in 'build_extensions' from /usr/lib/ruby/2.1.0/rubygems/installer.rb:232:in 'install' from /usr/lib/ruby/2.1.0/rubygems/resolver/specification.rb:78:in 'install' from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:206:in 'block in install_into' from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in 'each' from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:198:in 'install_into' from /usr/lib/ruby/2.1.0/rubygems/request_set.rb:119:in 'install' from /usr/lib/ruby/2.1.0/rubygems/dependency_installer.rb:389:in 'install' from mkrf_conf.rb:15:in '' rake failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.1.0/gems/unf-0.2.0.beta2 for inspection. Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/unf-0.2.0.beta2/gem_make.out