升级cocoapods失败,报
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension
可以根据提示查看错误日志文件mkmf.log
错误日志解决方法:
1、先cd到ruby-2.6.0
cd $(xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0
看下列表有啥
ls
只有universal-darwin212、再插入“universal-darwin22 universal-darwin20” 和 “universal-darwin22 universal-darwin21”,如下
universal-darwin20、21、22都有了3、之后就可以sudo xcrun gem install cocoapods,以及sudo gem install -n /usr/local/bin cocoapods操作,发现可以升级cocoapods了。
网友评论