我已經用新版本更新了我的 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
uj5u.com熱心網友回復:
看來您使用的是系統紅寶石。盡量避免這種情況并安裝rbenv或rvm管理您的 ruby?? 版本。有關為什么不應該使用系統 ruby?? 的更多資訊,請參閱:
https ://mac.install.guide/faq/do-not-use-mac-system-ruby/index.html
uj5u.com熱心網友回復:
更新到 macOS 13.0 后,這對我有用:
安裝自制軟體
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )"
安裝可可豆莢
brew install --cask cocoapods
然后這個:
吊艙設定 --verbose
uj5u.com熱心網友回復:
在 Xcode 中打開您的專案,在 Project Document 下,將 Project Format 更改為 XCode13.0 compatible。然后關閉專案,然后重試 pod init。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/525801.html
上一篇:將xCode更新到v14.0.1后出現此錯誤-Swift編譯器錯誤:無法使用“@available”將存盤的屬性標記為可能不可用
