|
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:
- ruby -e "$(curl -fsSL [url]https://raw.githubusercontent.com/Homebrew/install/master/install[/url])"
复制代码
= = = = = = = = = = = = = = = = = = =
ERROR: While executing gem ... (Gem::FilePermissionError)
Try following:
- sudo gem install -n /usr/local/bin cocoapods
复制代码 |
|