新Mac book安装cocoa pods

首先 安装ruby  参考。http://www.cnblogs.com/daguo/p/4097263.html  不过最后没有切换成淘宝链接。安装完ruby后 开始安装cocoa pods  参考http://www.jianshu.com/p/b64b4fd08d3c。 第一步运行sudo gem install  cocoapods 

返回如下错误

ERROR:  While executing gem ... (Gem::Exception)

    Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources

查了查资料说可能是没有安装openssl引起的。 于是输入 brew install openssl

返回 

Updating Homebrew...

Warning: openssl is a keg-only and another version is linked to opt.

Use `brew install --force` if you want to install this version


于是输入 brew install openssl --force

返回

Warning: openssl-1.0.2k already installed, it's just not linked.


说是没链接,尝试连接 输入brew link --overwrite openssl

返回:

Warning: Refusing to link: openssl

Linking keg-only openssl means you may end up linking against the insecure,

deprecated system OpenSSL while using the headers from Homebrew's openssl.

Instead, pass the full include/library paths to your compiler e.g.:

  -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib


这个可难办了,查了半天,一上午的时间 总算找到了解决办法:参考链接 https://github.com/dotnet/cli/issues/3964#issuecomment-236485454

最终输入

ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/

ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/

解决了问题。特此记录下。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值