Mac升级10.13后,pod命令失效,报No such file or directory 错误如下:
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
解决方案:
终端执行命令
brew link --overwrite cocoapods
若报错,继续执行命令
brew install ruby
brew link --overwrite cocoapods
如果上面命令执行还不行的话,重新安装下:
1、安装Homebrew 终端执行:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2、安装Ruby
brew install ruby
3、重新安装CocoaPods
sudo gem install cocoapods
再次执行pod命令,运行正常。