在终端中尝试:
pod install
回复:
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require': dlopen(/Library/Ruby/Gems/2.6.0/gems/psych-5.1.0/lib/psych.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/psych-5.1.0/lib/psych.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Ruby/Gems/2.6.0/gems/psych-5.1.0/lib/psych.bundle' (no such file), '/Library/Ruby/Gems/2.6.0/gems/psych-5.1.0/lib/psych.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) - /Library/Ruby/Gems/2.6.0/gems/psych-5.1.0/lib/psych.bundle (LoadError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/psych-5.1.0/lib/psych.rb:13:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/yaml.rb:4:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/sources_manager.rb:6:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods/core_overrides.rb:1:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods.rb:77:in `<module:Pod>'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/lib/cocoapods.rb:17:in `<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in `require'
from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.12.1/bin/pod:36:in `<top (required)>'
from /usr/local/bin/pod:23:in `load'
from /usr/local/bin/pod:23:in `<main>'
3条答案
按热度按时间gmxoilav1#
错误消息是Ruby安装和YAML依赖项之间的兼容性问题。尝试以下步骤:
brew install libyaml
brew install rbenv
rbenv install 2.6.8
rbenv global 2.6.8
gem install bundler
gem install cocoapods
pod install
crcmnpdw2#
请尝试以下步骤:
请让我知道你在你的情况下有什么错误。
n3ipq98p3#
这种方法对我很有效。Apple M1 Pro系统
在终端:
然后重新启动终端
它工作正常。