【问题标题】:Pod init is not working for the new Mac OS Version 13.0 (22A380) VenturaPod init 不适用于新的 Mac OS 版本 13.0 (22A380) Ventura
【发布时间】:2022-11-02 02:47:05
【问题描述】:

我已经用新版本更新了我的 MacBook Pro 中的 Mac 操作系统。更新 Pod 后,init 不起作用。

我正在使用版本 13.0 (22A380) Ventura [15 英寸,2019] 型号。请帮我完成它。下面我收到以下错误

Ignoring ffi-1.15.3 because its extensions are not built. Try: gem pristine ffi --version 1.15.3

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String (FrozenError)
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/bin/pod:23:in `load'
    from /usr/local/bin/pod:23:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file': [Xcodeproj] Unknown object version (56). (RuntimeError)
    from /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/init.rb:41:in `validate!'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
    from /usr/local/bin/pod:23:in `load'
    from /usr/local/bin/pod:23:in `<main>'

当我尝试运行上述命令时。然后我收到以下错误。

ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

如果我正在尝试获取上述文件夹的权限,那么我会收到以下错误。

命令:chmod ugo+rwx /Library/Ruby/Gems/2.6.0

结果

chmod: Unable to change file mode on /Library/Ruby/Gems/2.6.0: Operation not permitted

【问题讨论】:

  • 您是否使用 home brew 安装 ruby​​?
  • 是的,我试过了,但它不允许我编辑一些文件!

标签: ios ruby-on-rails ruby xcode cocoapods


【解决方案1】:

看来您使用的是系统红宝石。尽量避免这种情况并安装rbenv 或rvm 来管理你的ruby 版本。有关为什么不应该使用系统 ruby​​ 的更多信息,请参阅: https://mac.install.guide/faq/do-not-use-mac-system-ruby/index.html

【讨论】:

    【解决方案2】:

    更新到 macOS 13.0 后,这对我有用:

    1. 安装自制软件

      /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

    2. 安装可可豆荚

      brew install --cask cocoapods

    3. 然后这个:

      吊舱设置 --verbose

    【讨论】:

      【解决方案3】:

      在 Xcode 中打开您的项目,在 Project Document 下,将 Project Format 更改为 XCode13.0 compatible。然后关闭项目,然后重试 pod init。

      【讨论】:

        猜你喜欢
        • 2023-02-01
        • 2022-12-17
        • 1970-01-01
        • 1970-01-01
        • 2022-11-22
        • 1970-01-01
        • 2022-11-02
        • 1970-01-01
        • 2022-10-25
        相关资源
        最近更新 更多