我从CocoaPods 1.3.1升级到1.5.3。我正在使用Xcode 9.2
我在安装Pod时遇到问题。希望它可以正确安装所有pod依赖项。
相反,在执行过程中出现了以下错误:
LoadError-无法加载此类文件-强壮男子 /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:432:in
rescue in dynamic_binary?' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:427:in
dynamic_binary?' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:164:在block in vendored_dynamic_frameworks' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:in
中选择“ /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:163:invendored_dynamic_frameworks' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:172:in
vendored_static_frameworks' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/sandbox/file_accessor.rb:238:invendored_static_artifacts' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:56:in
中的“生成” /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:56:each' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:56:in
中的任何内容?” /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:56:ingenerate' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb:39:in
save_as' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb:107:update_changed_file' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:96:in
中的create_xcconfig_file块 /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:93:ineach' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:93:in
create_xcconfig_file' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:18:inblock in install!' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:in
message' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb:14:ininstall!' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:181:in
中(2级)在install_libraries'中 /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:179:ineach' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:179:in
在install_libraries中阻止 /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:142:inmessage' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:167:in
install_libraries' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:65:ingenerate!' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:184:in
中的generate_pods_project中的' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/user_interface.rb:64:insection' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:183:in
generate_pods_project' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/installer.rb:119:ininstall!' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/command/install.rb:41:in
run' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/claide-1.0.2/lib/claide/command.rb:334:inrun' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/lib/cocoapods/command.rb:52:in
run' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/cocoapods-1.5.3/bin/pod:55:in<top (required)>' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/bin/pod:23:in
load' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/bin/pod:23:in<main>' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in
eval' /Users/kdanielwong/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:15:in''
pod env
CocoaPods : 1.5.3
Ruby : ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
RubyGems : 2.5.0
Host : Mac OS X 10.12.6 (16G1408)
Xcode : 9.2 (9C40b)
Git : git version 2.14.3 (Apple Git-98)
Ruby lib dir : /Users/kdanielwong/.rvm/rubies/ruby-2.1.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 0394a8486df6a54691151f75289676af4c7237d5
可执行路径:/Users/kdanielwong/.rvm/gems/ruby-2.1.1/bin/pod
cocoapods-inintegrate:1.0.2 cocoapods插件:1.0.0 cocoapods-搜索:1.0.0 cocoapods-stats:1.0.0 椰子足-1.3.0 cocoapods-try:1.1.0
ruby
platform :ios, '9.0'
target 'IGapp' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
use_frameworks!
# Pods for IGapp
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'AFNetworking', '~> 3.0'
pod 'SDWebImage', '~> 4.0'
pod 'TOCropViewController'
target 'IGappTests' do
inherit! :search_paths
# Pods for testing
end
target 'IGappUITests' do
inherit! :search_paths
# Pods for testing
end
结束
我尝试卸载和安装ruby macho,但这没有帮助。
宝石哪个男子气概
/Users/kdanielwong/.rvm/gems/ruby-2.1.1/gems/ruby-macho-1.2.0/lib/macho.rb
您知道我还能尝试什么吗?
答案 0 :(得分:6)
感谢对the cocoapods GitHub repository的评论,我去编辑了堆栈跟踪(file_accessor.rb)顶部的文件,并将顶行从autoload :MachO, 'macho'
更改为require 'macho'
< / p>
问题消失了!
答案 1 :(得分:6)
一种对我有用的方法是删除当前版本:
gem uninstall ruby-macho
然后使用以下命令重新安装它:
gem install ruby-macho --source=http://rubygems.org