macOS 13.0 Cocoapods installation (you don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory)
❓You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory
❓Cause of the problem: There is a folder permission problem when installing Cocoapods🔧Try to solve it: try to solve it by sudo with super administrator rights (personal test does not work❌)
🔧Try to solve: Try to solve the problem by restarting and turning off SIP (personal test does not work❌)
Conclusion: After consulting the relevant information, I found that there is currently no simple direct solution for macOS 13.0 (there is another very troublesome direct solution), but it can be installed through Brew bypasses the permission problem
☑️Solution:
🔧Install brew by installing the package manager Homebrew (also called brew), then install Cocoapods through brew, bypass the permission problem to install Homebrew, it is recommended to use Tencent source (if this does not work, change to another source , sometimes this line, sometimes that line), use the regular installation script, run from the command line
Apple computer regular installation script (recommended to complete the installation in a few minutes):
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
Apple Computer Rapid Installation Script (Lite Version Completed in seconds):
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.
Diagnose the problem. After the installation is complete, check if there are any problems. Run the command line and follow the prompts to solve the problem. XcodeYou can ignore the updated version for the time being.
brew doctor
🔧Install ruby (if not required, you can skip to the step of installing Cocopods)
brew install ruby
ruby whether the installation is successful and query the relevant installation directory
/usr/bin/ruby for the system directory
Which ruby
Output result:/usr/bin/ruby
Ruby - v
Output result: Ruby 2.6.10p210 (2022-04-12 revision 67958) [universal. arm64e darwin22]