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

2017-10-19  本文已影响55人  知交

更新为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的安装

上一篇 下一篇

猜你喜欢

热点阅读