美文网首页
解决 Mac OS 10.14: 升级Cocopods Fail

解决 Mac OS 10.14: 升级Cocopods Fail

作者: 开心的小娇 | 来源:发表于2020-09-17 14:43 被阅读0次

在升级cocoapods 时使用

sudo gem install cocoapods

会报如下错误:

Building native extensions. This could take a while...

ERROR:  Error installing cocoapods:

ERROR: Failed to build gem native extension.

如果是之前的 Mac OS 版本,网上都是通过xcode-select --install 来解决,但是我在 Mac OS 10.14.1 版本下,依然存在报错。

最后找到如下方法:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

之后按提示安装完成,在执行sudo gem install cocoapods命令,成功升级,如下:

Done installing documentation for ffi, ethon, typhoeus, cocoapods-core, cocoapods-deintegrate, cocoapods-downloader, cocoapods-trunk, molinillo, atomos, nanaimo, xcodeproj, fourflusher, ruby-macho, cocoapods after 44 seconds

14 gems installed

相关文章

网友评论

      本文标题:解决 Mac OS 10.14: 升级Cocopods Fail

      本文链接:https://www.haomeiwen.com/subject/klvlyktx.html