找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 451|回复: 0

Install Cocoapods on Mac

[复制链接]

66

主题

42

回帖

356

积分

区板主

积分
356
发表于 2024-10-28 21:22:55 | 显示全部楼层 |阅读模式
1. Open Terminal

2. sudo gem install cocoapods

3. Wait and installation complete then do the setup using:
pod setup

= = = = = = = = = = = = = = = = = =

如果在 pod init 時遇到錯誤 `pwd': Operation not permitted - getcwd (Errno::EPERM)

試試下面方法
You're having an issue with macOS sandboxing permissions. The easiest fix is not to use the built-in version of Ruby that ships with macOS and instead use a Ruby manager to install Ruby:

Install RVM with:
\curl -sSL https://get.rvm.io | bash -s stable

Restart your shell

Install Ruby with:
rvm install 2.6

Install cocoapods with this command (and do not use sudo):
gem install cocoapods

Confirm that the output of which pod is something like:
/Users/foo/.rvm/gems/ruby-2.6.3/bin/pod

Then retry your pod init command

= = = = = = = = = = = = = = = = = = =

Requirements installation failed with status: 1.

Try following:
  1. ruby -e "$(curl -fsSL [url]https://raw.githubusercontent.com/Homebrew/install/master/install[/url])"
复制代码



= = = = = = = = = = = = = = = = = = =

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

Try following:

  1. sudo gem install -n /usr/local/bin cocoapods
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表