High Sierra 中的 cocoapods 权限问题?
cocoapods permission issue in High Sierra?
我将我的 macOS 更新为 High Sierra,现在通过 cocoapods 在我的 iOS 应用程序中安装依赖项。但是我遇到以下错误。
XXXXXXXXX:MyProject CompanyName$ pod update
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
比我试过
Zubair-mac-mini:~ sdsol$ gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
Zubair-mac-mini:~ sdsol$
如有任何帮助,我们将不胜感激。
我在升级到 macOS High Sierra 后遇到了同样的问题,并通过以下命令修复了它(注意,您需要使用 sudo
到 运行 作为超级用户):
sudo gem update --system
sudo gem install cocoapods -n/usr/local/bin
祝你好运!
经过大量搜索终于找到了解决方案。
1:将您的终端更新到最新版本。
2:从以下位置下载 RubyGems 并将其更新到最新版本:https://rubygems.org/pages/download
3:我更新了我的 pod 文件。通过 pod 更新。
升级到 macOS High Sierra 后,使用以下命令修复它:
sudo gem install cocoapods
添加
eval "$(rbenv init -)"
到 ~/.bash_profile
文件
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
我将我的 macOS 更新为 High Sierra,现在通过 cocoapods 在我的 iOS 应用程序中安装依赖项。但是我遇到以下错误。
XXXXXXXXX:MyProject CompanyName$ pod update
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
比我试过
Zubair-mac-mini:~ sdsol$ gem install cocoapods
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
Zubair-mac-mini:~ sdsol$
如有任何帮助,我们将不胜感激。
我在升级到 macOS High Sierra 后遇到了同样的问题,并通过以下命令修复了它(注意,您需要使用 sudo
到 运行 作为超级用户):
sudo gem update --system
sudo gem install cocoapods -n/usr/local/bin
祝你好运!
经过大量搜索终于找到了解决方案。
1:将您的终端更新到最新版本。
2:从以下位置下载 RubyGems 并将其更新到最新版本:https://rubygems.org/pages/download
3:我更新了我的 pod 文件。通过 pod 更新。
升级到 macOS High Sierra 后,使用以下命令修复它:
sudo gem install cocoapods
添加
eval "$(rbenv init -)"
到 ~/.bash_profile
文件
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer