当前位置: 首页 > 工具软件 > fastlane > 使用案例 >

安装Fastlane遇到的一些报错

黄昊英
2023-12-01

1. sudo gem install sigh

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /usr/bin directory.

使用命令 sudo gem install sigh -n /usr/local/bin


2. mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

我mac 是10.14 ,cd进目录发现确实没有include/ruby.h
最终找到解决方式,执行:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
然后根据提示安装即可


3. signet requires Ruby version >= 2.4.0. The current ruby version is 2.3

signet requires Ruby version >= 2.4.0. The current ruby version is 2.3

解决办法:更新Ruby版本

参考 https://www.cnblogs.com/zwting/p/11686449.html

1. 安装rvm,在命令行里执行以下步骤:

(1)curl -L get.rvm.io | bash -s stable

(2)source ~/.rvm/scripts/rvm

(3)echo "ruby_url=https://cache.ruby-china.org/pub/ruby" > ~/.rvm/user/db

(4)rvm -v

 (5) rvm install 2.6.0

4. curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out

解决办法 : 修改hosts文件,加上下面的这些IP地址配置

52.74.223.119 github.com
192.30.253.119 gist.github.com
54.169.195.247 api.github.com
185.199.111.153 assets-cdn.github.com
151.101.76.133 raw.githubusercontent.com
151.101.108.133 user-images.githubusercontent.com
151.101.76.133 gist.githubusercontent.com
151.101.76.133 cloud.githubusercontent.com
151.101.76.133 camo.githubusercontent.com
151.101.76.133 avatars0.githubusercontent.com
151.101.76.133 avatars1.githubusercontent.com
151.101.76.133 avatars2.githubusercontent.com
151.101.76.133 avatars3.githubusercontent.com
151.101.76.133 avatars4.githubusercontent.com
151.101.76.133 avatars5.githubusercontent.com
151.101.76.133 avatars6.githubusercontent.com
151.101.76.133 avatars7.githubusercontent.com
151.101.76.133 avatars8.githubusercontent.com
 类似资料: