无root权限的Mac系统安装cocoapods

安装gem

遇到报错 Error installing Ruby with rvm: “__rvm_make -j8”

log中有如下报错信息:

1
ossl_ts.c:829:5: error: incomplete definition of type 'struct TS_verify_ctx' TS_VERIFY_CTX_set_certs(ctx, x509inter);

参考 https://stackoverflow.com/questions/76922732/error-installing-ruby-with-rvm-rvm-make-j8 ,执行

1
2
3
4
export CONFIGURE_ARGS=""
for ext in openssl readline libyaml zlib; do
CONFIGURE_ARGS="${CONFIGURE_ARGS} --with-$ext-dir=$(brew --prefix $ext)"
done

再安装 gem 即可

1
rvm install 3.1.0 --disable-binary -C --with-openssl-dir=/Users/XXX/homebrew/bin/openssl --autolibs=read-only

安装cocoapods

1
gem install cocoapods --user-install
分享到:

评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理