美文网首页
安装cocoapods

安装cocoapods

作者: 择一城终老_347e | 来源:发表于2024-12-16 11:17 被阅读0次

替换Gems源(使用清华镜像https://mirrors.tuna.tsinghua.edu.cn/help/rubygems/)

遇到Ruby版本问题

更新 Ruby 版本

1. 安装 Homebrew(如果没有安装的话):

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2. 更新 Ruby:

brew install ruby

安装cocoapods

安装后运行pod指令

zsh: command not found: pod

运行以下命令查看是否安装了 CocoaPods:

gem list cocoapods

如果未安装,重新安装

如果已安装,说明gem 安装的 pod 命令没有被正确添加到 PATH 环境变量中。查找安装路径

find / -name pod 2>/dev/null

打开.zshrc文件,添加环境变量

相关文章

网友评论

      本文标题:安装cocoapods

      本文链接:https://www.haomeiwen.com/subject/gmtkejtx.html