安裝fastlane
sudo gem install fastlane >
You don't have write permissions for the /usr/bin directory.
權(quán)限問題,將fastlane安裝在/usr/local/bin:sudo gem install fastlane -n /usr/local/binFailed to build gem native extension. >
Failed to build gem native extension,......To see why this extension failed to compile, please check the mkmf.log which can be found here:
可以打開mkmf.log: open mkmf.log 查看問題枪蘑,發(fā)現(xiàn)是fatal error: 'ruby/config.h' file not found #include "ruby/config.h" 原因是缺少文件邻悬,將Xcode的配置拷貝到/usr/local/include:sudo cp -rf /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby /usr/local/include/ERROR: Failed to build gem native extension. >
No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin20/ruby/config.h', needed by `unf.o'. Stop.'
需要在 ruby-2.6.0 目錄下創(chuàng)建一個 universal-darwin20扇谣,因為cp -r命令失敗薛躬,我的操作是到目錄下面手動拷貝瘾境,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin20
fastlane -v