无论我做什么,flutter doctor 始终返回以下结果:
我得到的错误信息是: ERROR: 在执行 gem ... (Errno::EACCES) 时 被拒绝的权限 @ dir_s_mkdir - /Users/omkar/.local/share/gem/specs
我尝试过使用:
[!] Xcode - develop for iOS and macOS (Xcode 13.3)
• Xcode at /Volumes/ssd/Applications/Xcode.app/Contents/Developer
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
当我运行
$ gem install cocoapods
我得到的错误信息是: ERROR: 在执行 gem ... (Errno::EACCES) 时 被拒绝的权限 @ dir_s_mkdir - /Users/omkar/.local/share/gem/specs
我尝试过使用:
$ sudo chown -R /Users/omkar/.local/share/gem/*
密码:
但我得到了以下内容: 用法:chown [-fhnvx] [-R [-H | -L | -P]] owner[:group] file ... chown [-fhnvx] [-R [-H | -L | -P]] :group file ...
而且权限问题仍然存在。
我该如何授予所需的权限?
更多信息: 我按照此答案安装brew, 以下是输出:
$ which ruby
/usr/local/opt/ruby/bin/ruby
$ ruby -v
ruby 3.1.1p18 (2022年2月18日修订版 53f5fc4236) [x86_64-darwin21]