安装cocoapods: Error installing cocoapods: The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.6. Try installing it with `gem install activesupport -v 6.1.7.6`问题解决
问题描述:
在终端命令行安装cocoapods时,可能出现如下问题:
Error installing cocoapods:
The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.6. Try installing it with `gem install activesupport -v 6.1.7.6` and then running the current command again
activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
安装茧时出错:
支持Ruby和RubyGems的activesupport(>=5.0,<8)的最后一个版本是6.1.7.6。尝试使用“gem-install-activesupport-v 6.1.7.6”安装它,然后再次运行当前命令
activesupport需要Ruby版本>=2.7.0。当前的ruby版本是2.6.10.210。
解决方法:
方法一:
使用Homebrew安装cocoapods.在终端安装Homebrew.输入命令行:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
安装成功后在终端输入:
brew install cocoapods
如果报错zsh: command not found: brew,请查看博客:
Homebrew安装cocoapods: zsh: command not found: brew解决方法
方法二:
安装cocoapods时指定个低版本:
sudo gem install cocoapods -v 1.8.4
分类:
iOS开发Swift
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· 百万级群聊的设计实践
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
· 永远不要相信用户的输入:从 SQL 注入攻防看输入验证的重要性