cocoapods 安装失败记录

$ sudo gem install cocoapods -n /usr/local/bin

ERROR:  SSL verification error at depth 3: certificate has expired (10)
ERROR:  Certificate /O=Digital Signature Trust Co./CN=DST Root CA X3 expired at 2021-09-30T14:01:15Z
ERROR:  SSL verification error at depth 3: certificate has expired (10)
ERROR:  Certificate /O=Digital Signature Trust Co./CN=DST Root CA X3 expired at 2021-09-30T14:01:15Z
ERROR:  SSL verification error at depth 3: certificate has expired (10)
ERROR:  Certificate /O=Digital Signature Trust Co./CN=DST Root CA X3 expired at 2021-09-30T14:01:15Z
ERROR:  Could not find a valid gem 'cocoapods' (>= 0), here is why:
          Unable to download data from https://gems.ruby-china.com - SSL_connect returned=1 errno=0 state=error: certificate verify failed (certificate has expired) (https://gems.ruby-china.com/specs.4.8.gz)
ERROR:  SSL verification error at depth 3: certificate has expired (10)
ERROR:  Certificate /O=Digital Signature Trust Co./CN=DST Root CA X3 expired at 2021-09-30T14:01:15Z
ERROR:  SSL verification error at depth 3: certificate has expired (10)
ERROR:  Certificate /O=Digital Signature Trust Co./CN=DST Root CA X3 expired at 2021-09-30T14:01:15Z

下载 new CA certificate 后 替换 /usr/local/etc/openssl/cert.pem, 注意要重命名一下下载文件。

然后执行一下一下命令:

$ sudo rm /etc/ssl/cert.pem

$ sudo ln -s /usr/local/etc/openssl/cert.pem /etc/ssl/cert.pem
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容