最近在使用pod install命令时一直报错:bash
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory. 复制代码
错误信息显示权限不够,好吧,修改权限session
sudo gem install cocoapods --pre
sudo chmod 777 /Library/Ruby/Gems/2.3.0
复制代码
试试证实以上命令均无效: 最后使用一下命令安装成功ui
sudo gem install cocoapods -n /usr/local/bin
复制代码
而后this
pod install
复制代码
成功执行spa
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.
复制代码