Mac安装CocoaPods

关于安装pod时的报错:

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/ffi-1.15.0/mkmf.log

extconf failed, exit code 1

解决方案:

文件夹前往:

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0 

所以将20复制粘贴将universal-darwin20文件改成universal-darwin19,如图:


再执行sudo gem install cocoapods

原文链接 

https://www.jianshu.com/p/f00be46d77ef

你可能感兴趣的:(Mac安装CocoaPods)