/usr/local/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory

11-06 21:36 字数 398 阅读 70

升级 macOS 后,执行 pod install 报错如下

/usr/local/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory

解决办法

1、更新gem:sudo gem update --system

2、删除gem源:gem sources --remove https://ruby.taobao.org/

3、修改gem源:gem sources -a https://gems.ruby-china.org

4、查看gem源是否是最新的:gem sources -l

5、升级cocoapods:sudo gem install -n /usr/local/bin cocoapods --pre

6、查看升级后的cocoapods版本:pod --version

0人点赞>
关注 收藏 改进 举报
0 条评论
排序方式 时间 投票
快来抢占一楼吧
请登录后发表评论