pod install
出现
### Error
LoadError - cannot load such file -- macho
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:432:in `rescue in dynamic_binary?'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:427:in `dynamic_binary?'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:164:in `block in vendored_dynamic_frameworks'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:in `select'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:in `vendored_dynamic_frameworks'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:172:in `vendored_static_frameworks'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:122:in `add_static_dependency_build_settings'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:89:in `block in add_settings_for_file_accessors_of_target'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:86:in `each'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb:86:in `add_settings_for_file_accessors_of_target'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/pod_xcconfig.rb:65:in `generate'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/pod_xcconfig.rb:39:in `save_as'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:107:in `update_changed_file'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:384:in `create_xcconfig_file'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:28:in `block in install!'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:in `message'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:19:in `install!'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:176:in `block (2 levels) in install_libraries'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:173:in `each'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:173:in `block in install_libraries'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:in `message'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:167:in `install_libraries'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:65:in `generate!'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:184:in `block in generate_pods_project'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:in `section'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:183:in `generate_pods_project'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:119:in `install!'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in `run'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4@global/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in `run'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/bin/pod:55:in `<top (required)>'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/bin/pod:22:in `load'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/bin/pod:22:in `<main>'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:24:in `eval'
/Users/weiyuxiang/.rvm/gems/ruby-2.2.4/bin/ruby_executable_hooks:24:in `<main>'
――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=cannot+load+such+file+--+macho&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!
Looking for related issues on cocoapods/cocoapods...
- LoadError - cannot load such file -- macho
https://github.com/CocoaPods/CocoaPods/issues/7867 [open] [10 comments]
a day ago
- LoadError - cannot load such file -- macho
https://github.com/CocoaPods/CocoaPods/issues/7864 [closed] [2 comments]
a week ago
- LoadError - cannot load such file -- macho
https://github.com/CocoaPods/CocoaPods/issues/7849 [closed] [2 comments]
a week ago
and 5 more at:
https://github.com/cocoapods/cocoapods/search?q=cannot%20load%20such%20file%20--%20macho&type=Issues&utf8=✓
的问题,解决方法:
在终端
cd /Users/weiyuxiang/.rvm/gems/ruby-2.2.4/gems/cocoapods-1.5.3/lib/cocoapods/sandbox
打开file_accessor.rb
文件,修改头部
autoload :MachO, 'macho'
-> require 'macho'
保存即可。