我在更新cocoapods时遇到了一个错误,目前正在使用Visual Studio Code的m1 Macbook,但是我在Github和Stackoverflow中寻找了很多解决方案也不起作用。如果有人谁熟悉这个请让我知道或提供线索,我应该检查,更感谢您的帮助!
首先,有取消注解版本的平台IOS(podfile)从一个网站,但它不工作,以及
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
其次,它显示过时版本的cocoapods错误,所以运行cocoapods更新命令(“pod repo update”),它也不起作用。下面是调试控制台的输出。
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
Error launching application on iPhone 12 Pro Max.
第三,一旦我运行“pod repo update”,它会出现另一个错误,例如下面的错误,但是我也会关注Github解决方案,因为其中一些提到了ffi,所以尝试了命令“sudo arch -x86_64 gem install ffi”和“arch -x86_64 pod install”,但是在运行“arch -x86_64 pod install”时出现问题,我我被困在这里不知道如何修复这个错误...
### Error
LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi.rb:5:in rescue in <top (required)>' /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.1/lib/ffi.rb:2:in
<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in <top (required)>' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in
<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in
require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:440:in download_typhoeus_impl_async' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:372:in
download_and_save_with_retries_async'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:365:in download_file_async' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:338:in
download_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:78:in deprecated_local_podspecs' /Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:60:in
preheat_existing_files'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:257:in update' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:135:in
block (3 levels) in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:134:in
block (2 levels) in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:133:in each' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:133:in
block in update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:131:in open' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:131:in
update'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:145:in block in update_repositories' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:143:in
each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:143:in update_repositories' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:235:in
block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:234:in
resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in
run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in
run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in <top (required)>' /usr/local/bin/pod:23:in
load'
/usr/local/bin/pod:23:in `'
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.1%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+missing+compatible+arch+in+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.1%2Flib%2Fffi_c.bundle+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.1%2Flib%2Fffi_c.bundle&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
运行此““arch -x86_64 pod install””命令后,错误显示如下
Analyzing dependencies
firebase_auth: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
In Podfile:
firebase_auth (from .symlinks/plugins/firebase_auth/ios
) was resolved to 1.2.0, which depends on
Firebase/Auth (= 8.0.0)
None of your spec sources contain a spec satisfying the dependency: Firebase/Auth (= 8.0.0)
.
You have either:
- out-of-date source repos which you can update with
pod repo update
or withpod install --repo-update
. - mistyped the name or version.
- not added the source repo that hosts the Podspec to your Podfile.
3条答案
按热度按时间ct3nt3jp1#
您必须在Rosetta模式下运行终端
1hdlvixo2#
即使在rosetta模式下运行,如果您仍然面临这个问题,请尝试使用
arch -x86_64 <command>
在rosetta中运行任何命令。例如,对于
pod install
arch -x86_64 pod install
此外,您可以将
alias rose='arch -x86_64'
添加到.zshrc
。之后就开火
rose pod install
完成!!
ds97pgxw3#
这就是我的方法
我在写了两个命令后导航到了终端中的iOS文件夹