最近在使用pod install命令时一直报错:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
错误信息显示权限不够,好吧,修改权限
sudo gem install cocoapods --pre
sudo chmod 777 /Library/Ruby/Gems/2.3.0
试试证明以上命令均无效:
最后使用一下命令安装成功
sudo gem install cocoapods -n /usr/local/bin
然后
pod install
成功执行
Analyzing dependencies
Downloading dependencies
Installing SDWebImage (4.3.3)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `MainProject.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
解决pod install权限问题
本文介绍了在使用CocoaPods过程中遇到的权限错误,并提供了解决方案,包括使用sudo gem命令进行正确安装。
1172

被折叠的 条评论
为什么被折叠?



