升级macos big sur 之后pod update报错

升级macos big sur 之后pod update 报

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

或者升级macos big sur 后从新安装pod时报:Error installing cocoapods:ERROR: Failed to build gem native extension.

解决步骤

1. 下载command line tool   

地址: https://developer.apple.com/download/more/?=for%20Xcode

   或  xcode -> Open Developer Tool ->More Developer Tools 下载并安装 

2.sudo xcode-select --switch /Library/Developer/CommandLineTools

3.sudo gem install cocoapods

4.sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

你可能感兴趣的:(升级macos big sur 之后pod update报错)