更新为macOS 10.13之后cocoapods不能用了

更新为macOS 10.13之后cocoapods不能用了,网上搜索结果为就是重新安装一下

sudo gem install cocoapods

然后终端提醒我错误:ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String

于是更新gem

sudo gem update --system

更新成功后再次输入

sudo gem install cocoapods

这次错误变了 :ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/bin directory.
(说我没有写入/usr/bin的权限)

然后输入命令查看一下之前安装的pod的地址: which pod

发现地址为 /usr/local/bin

所以我们输入命令

sudo gem install -n /usr/local/bin cocoapods

发现更新成功了!

其他

CocoaPods的安装

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容