首先,我对 iOS 开发和 MAC 真的很陌生(一周只拥有一个)
我正在尝试创建一个需要安装 pod 的 iOS 应用程序,我已经安装了 cocopods 等,然后导航到我的项目目录。然后我生成了 pod 文件并添加了所需的依赖项。当它运行 pod install 时,出现错误,
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: https://www.ruby-lang.org/bugreport.html
错误顶部:
Analyzing dependencies
/Users/pilotman/.gem/ruby/2.6.0/gems/ethon-0.14.0/lib/ethon/curls/classes.rb:36: [BUG] Illegal instruction at 0x00000001021b4000
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
错误底部:
[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.
zsh: abort pod install
这个问题很笼统...
您使用的是 Macbook M1 吗?还是英特尔 Macbook?
如果您使用的是英特尔 MacBook ...
-
$sudo gem install cocoapods
-
移动到您的文件夹运行 pod init
-
打开你的 Podfile 并添加你的目标,例如
#platform :ios, '9.0'
target 'MyPod' do
# Pods for MyPod
pod 'Firebase/Auth'
end
-
关闭 Podfile
-
类型 pod install
-
类型 Pod 更新
-
打开MyPod.xcworkspace并开始工作
如果您使用的是 M1 Mb,请执行相同的操作,但从
- 右键单击终端
- 获取信息 -> 使用 Rosetta 打开
- 打开终端并输入 sudo gem install ffi
然后执行上述步骤。
如果仍然出现此错误,请告诉我。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)