拉取项目之后,使用 pod install 拉取第三方代码的时候出现下面错误
[!] The version of CocoaPods used to generate the lockfile (1.5.0) is higher than the version of the current executable (1.3.1). Incompatibility issues may arise.
更新cocoaPods,终端输入:sudo gem install cocoapods
之后,又出现了下面的错误:
ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/bin directory.
终端输入:sudo gem install -n /usr/local/bin cocoapods
输入密码,执行结果如下图:
这次终于解决了,再次在终端输入pod install 时,出现了下图结果,说明cocoaPods可以正常使用了: