在我的m1 macbook设备上初始化react本机应用程序时,下载软件包时出现cocapods错误



我正在运行命令npx react native init-myapp,当它初始化项目时,给了我这个错误

error Error: Failed to install CocoaPods dependencies for iOS project, which is required by this template.
Please try again manually: "cd ./AwesomeProject/ios && pod install".
CocoaPods documentation: https://cocoapods.org/

当我试着跑";cd/真棒项目/ios&吊舱安装";在错误之后,它给了我错误

Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
/Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:36: [BUG] Illegal instruction at 0x0000000104850000
ruby 2.6.8p205 (2021-07-07 revision 67951) [universal.arm64e-darwin21]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:                    
* ~/Library/Logs/DiagnosticReports                                     
* /Library/Logs/DiagnosticReports                                      
for more details.                                                        
Don't forget to include the above Crash Report log file in bug reports.     
-- Control frame information -----------------------------------------------
c:0054 p:---- s:0314 e:000313 CFUNC  :getdtablesize
c:0053 p:0050 s:0310 e:000309 CLASS  /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:36
c:0052 p:0075 s:0307 e:000306 CLASS  /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:27
c:0051 p:0007 s:0304 e:000303 CLASS  /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:3
c:0050 p:0007 s:0301 e:000300 TOP    /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/classes.rb:2 [FINISH]
c:0049 p:---- s:0298 e:000297 CFUNC  :require
c:0048 p:0110 s:0293 e:000292 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0047 p:0128 s:0281 e:000280 CLASS  /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curl.rb:29
c:0046 p:0007 s:0278 e:000277 CLASS  /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curl.rb:14
c:0045 p:0049 s:0275 e:000274 TOP    /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curl.rb:9 [FINISH]
c:0044 p:---- s:0272 e:000271 CFUNC  :require
c:0043 p:0110 s:0267 e:000266 METHOD /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54
c:0042 p:0049 s:0255 e:000254 TOP    /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon.rb:16 [FINISH]
c:0041 p:---- s:0252 e:000251 CFUNC  :require
c:0040 p:0110 s:0247 e:000246 METHOD /
449 /Library/Ruby/Gems/2.6.0/gems/coc
...
1.11.2/lib/cocoapods/installer/analyzer/target_inspection_result.rb
597 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer/specs_state.rb
598 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/external_sources/abstract_external_source.rb
599 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/external_sources/downloader_source.rb
600 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/external_sources/path_source.rb
601 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/external_sources/podspec_source.rb
602 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/external_sources.rb
603 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/array/wrap.rb
604 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/array/access.rb
605 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/array/extract.rb
606 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/array/extract_options.rb
607 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/array/grouping.rb
608 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/symbol/starts_ends_with.rb
609 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/array_inquirer.rb
610 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/array/inquiry.rb
611 /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.4.1/lib/active_support/core_ext/array.rb
612 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/validator.rb
613 /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.11/lib/i18n/backend.rb
614 /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.11/lib/i18n/core_ext/hash.rb
615 /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.11/lib/i18n/backend/transliterator.rb
616 /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.11/lib/i18n/backend/base.rb
617 /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.11/lib/i18n/backend/simple.rb
618 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/action.rb
619 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/add_edge_no_circular.rb
620 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/add_vertex.rb
621 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/delete_edge.rb
622 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/detach_vertex_named.rb
623 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/set_payload.rb
624 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/tag.rb
625 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/log.rb
626 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph/vertex.rb
627 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/dependency_graph.rb
628 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer/locking_dependency_analyzer.rb
629 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/gem_metadata.rb
630 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/state.rb
631 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/modules/specification_provider.rb
632 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/resolution_state.rb
633 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb
634 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb
635 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/modules/ui.rb
636 /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo.rb
637 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver/lazy_specification.rb
638 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver/resolver_specification.rb
639 /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb
640 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin21/digest/sha2.bundle
641 /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/digest/sha2.rb
642 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi_c.bundle
643 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/platform.rb
644 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/data_converter.rb
645 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/types.rb
646 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/library.rb
647 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/errno.rb
648 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/abstract_memory.rb
649 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/pointer.rb
650 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/memorypointer.rb
651 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/struct_layout.rb
652 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/struct_layout_builder.rb
653 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/struct_by_reference.rb
654 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/struct.rb
655 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/union.rb
656 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/managedstruct.rb
657 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/callback.rb
658 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/io.rb
659 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/autopointer.rb
660 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/variadic.rb
661 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/enum.rb
662 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/version.rb
663 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi/ffi.rb
664 /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.4/lib/ffi.rb
665 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/libc.rb
666 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/codes.rb
667 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/options.rb
668 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/infos.rb
669 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/form_options.rb
670 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/messages.rb
671 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/functions.rb
672 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/constants.rb
673 /Library/Ruby/Gems/2.6.0/gems/ethon-0.15.0/lib/ethon/curls/settings.rb
[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
[IMPORTANT]
Don't forget to include the Crash Report log file under
DiagnosticReports directory in bug reports.
zsh: abort      pod install
beykan@alper-MacBook-Air ios %

我研究了一点,但找不到任何有用的资源。

请尝试:

sudo arch -x86_64 gem install ffi 

然后

arch -x86_64 pod install 

最新更新