请选择 进入手机版 | 继续访问电脑版

AI 社区

 找回密码
 立即注册
查看: 2441|回复: 3

Install Cocoapods on Mac

[复制链接]

82

主题

18

回帖

496

积分

区板主

Rank: 8Rank: 8

积分
496
发表于 2021-10-19 19:32:37 | 显示全部楼层 |阅读模式

1. Open Terminal

2. sudo gem install cocoapods

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

使用道具 举报

82

主题

18

回帖

496

积分

区板主

Rank: 8Rank: 8

积分
496
 楼主| 发表于 2021-10-19 19:32:54 | 显示全部楼层

如果在 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
回复

使用道具 举报

82

主题

18

回帖

496

积分

区板主

Rank: 8Rank: 8

积分
496
 楼主| 发表于 2021-10-19 19:33:12 | 显示全部楼层
Requirements installation failed with status: 1.

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

回复

使用道具 举报

82

主题

18

回帖

496

积分

区板主

Rank: 8Rank: 8

积分
496
 楼主| 发表于 2021-10-19 19:33:34 | 显示全部楼层
ERROR: While executing gem ... (Gem::FilePermissionError)

Try following:
  1. sudo gem install -n /usr/local/bin cocoapods
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|AI 社区

GMT+8, 2023-6-2 10:04 , Processed in 0.022893 second(s), 20 queries .

Copyright © 2021 AI 社区

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