大家好,又见面了,我是全栈君。
提升Mac OS X 10.10 Xcode 6.1之后。Cocoapods图书馆管理也依赖于相应升级。现在最新的Release版本号是 0.34。在之前的版本号。当数据库更新和管理,你会遇到一个错误,如下面的
代码语言:javascript复制/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- xcodeproj/prebuilt/universal.x86_64-darwin14-2.0.0/xcodeproj_ext (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:6:in `rescue in <top (required)>'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj/ext.rb:3:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/xcodeproj-0.17.0/lib/xcodeproj.rb:30:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/lib/cocoapods.rb:2:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.33.1/bin/pod:32:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
解决的方案例如以下,打开Terminals
1. 卸载 cocoapods
$ sudo gem uninstall cocoapods
2. 安装 xcodeproj
$ sudo gem install xcodeproj
3. 又一次安装cocoapods $ sudo gem install cocoapods
pod setup
4. 检查pod 版本号
pod –version
以上的命令运行过程中。假设出现红色字或者黄色的字,说明有错误,须要依据实际情况检查。
可能会遇到一个问题,在运行pod setup和 pod –version时,得到例如以下错误提示 verify_get_version
代码语言:javascript复制Options:
--silent Show nothing
--completion-script Print the auto-completion script
--version Show the version of the tool
--verbose Show more debugging information
--no-ansi Show output without ANSI codes
--help Show help banner of specified command
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:129:in `verify_git_version!'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/lib/cocoapods/command.rb:48:in `run'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.34.4/bin/pod:33:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
解决例如以下
打开xcode->Preferences->选择 Locaiton->在Command Line Tools中选择 Xcode 6.1,会提示输入sudopassword。
完毕之后,回到终端。输入git –version,确认是否1.9版本号以上
然后又一次安装上述 cocoapods的过程。
版权声明:本文博主原创文章,博客,未经同意不得转载。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/117107.html原文链接:https://javaforall.cn