升级到 mac os 10.15 Catalina后 cocoapods 无法使用,出现如下提示
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
解决办法
更新gem
//我开了科学上网
sudo gem update --system
如果出现以下异常
ERROR: While executing gem ... (Errno::EROFS)
Read-only file system @ rb_sysopen - /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/gem
请使用这样的安装方式
//我开了科学上网
sudo gem update -n /usr/local/bin --system
升级cocoapods
//我开了科学上网
sudo gem install -n /usr/local/bin cocoapods --pre