更新了Cocoapods,pod instell出现这样的错误

发布于 2022-09-02 09:59:26 字数 9785 浏览 20 评论 0

手贱更新了最新的ruby和cocoapods,对一个新项目使用pod时出现了如下错误

### Error

RuntimeError - can't modify frozen String
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:407:in `block (2 levels) in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `block in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:65:in `rescue in resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:57:in `resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:559:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:557:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:75:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:222:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:146:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:145:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:109:in `install!'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:67:in `run_install_with_update'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:97:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/claide-1.0.0.beta.1/lib/claide/command.rb:312:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command.rb:48:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `eval'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `<main>'


完整的运行日志如下:

Updating local specs repositories
Analyzing dependencies

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

Command

/usr/local/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack

   CocoaPods : 1.0.0.beta.4
        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
    RubyGems : 2.5.1
        Host : Mac OS X 10.11.3 (15D21)
       Xcode : 7.2.1 (7C1002)
         Git : git version 2.5.4 (Apple Git-61)
Ruby lib dir : /Users/zhq/.rvm/rubies/ruby-2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 4672fa6266f3ad8a6b03e7ab852fac0a8aba6cfc

Plugins

cocoapods-deintegrate : 1.0.0.beta.1
cocoapods-plugins     : 1.0.0.beta.1
cocoapods-search      : 1.0.0.beta.1
cocoapods-stats       : 1.0.0.beta.3
cocoapods-trunk       : 1.0.0.beta.2
cocoapods-try         : 1.0.0.beta.2

Podfile

platform :ios, ‘6.0’

use_frameworks!

target 'ikea' do
    pod 'JSONModel', '~> 1.2.0'
    pod 'MBProgressHUD', '~> 0.9.2'
    pod 'MJRefresh', '~> 3.1.0'
    pod 'FMDB', '~> 2.6'
    pod 'YYKit', '~> 0.9.11'
    pod 'OpenShare', '~> 0.0.1'
    pod 'UMengAnalytics', '~> 3.6.6'
    pod 'BaiduMapKit', '~> 2.10.0'
    pod 'CocoaLumberjack', '~> 2.2.0'
    pod 'SDWebImage', '~> 3.7.5’
    pod 'Masonry', '~> 0.6.1'
    pod 'pop', '~> 1.0.7'
    pod 'AFNetworking', '~> 3.0.4'
end

Error

RuntimeError - can't modify frozen String
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:407:in `block (2 levels) in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:398:in `block in handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `each'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:373:in `handle_resolver_error'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:65:in `rescue in resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/resolver.rb:57:in `resolve'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:559:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:557:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer/analyzer.rb:75:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:222:in `analyze'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:146:in `block in resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/user_interface.rb:63:in `section'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:145:in `resolve_dependencies'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/installer.rb:109:in `install!'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:67:in `run_install_with_update'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command/project.rb:97:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/claide-1.0.0.beta.1/lib/claide/command.rb:312:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/lib/cocoapods/command.rb:48:in `run'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/gems/cocoapods-1.0.0.beta.4/bin/pod:44:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `eval'
/Users/zhq/.rvm/gems/ruby-2.3.0@global/bin/ruby_executable_hooks:15:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=can%27t+modify+frozen+String&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!

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.
zhangheqingdeMacBook-Pro:ikea zhq$ touch Podfile
zhangheqingdeMacBook-Pro:ikea zhq$ open -e Podfile
zhangheqingdeMacBook-Pro:ikea zhq$ pod install
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.0.4)
Installing BaiduMapKit (2.10.0)
Installing CocoaLumberjack (2.2.0)
Installing FMDB (2.6)
Installing JSONModel (1.2.0)
Installing MBProgressHUD (0.9.2)
Installing MJRefresh (3.1.0)
Installing Masonry (0.6.4)
Installing OpenShare (0.0.1)
Installing SDWebImage (3.7.5)
Installing UMengAnalytics (3.6.6)
Installing YYKit (0.9.11)
Installing pop (1.0.9)
Generating Pods project
Integrating client project

[!] Please close any current Xcode sessions and use ikea.xcworkspace for this project from now on.
Sending stats
Pod installation complete! There are 13 dependencies from the Podfile and 13 total pods installed.

[!] Your Podfile has had smart quotes sanitised. To avoid issues in the future, you should not use TextEdit for editing it. If you are not using TextEdit, you should turn off smart quotes in your editor of choice.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

奢欲 2022-09-09 09:59:26

有时是不如重装试试。

习惯成性 2022-09-09 09:59:26
pod install --verbose --no-repo-update

have a try

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文