cocoapods的安装 遇到 Error installing pods:activesupport requires Ruby version >=2.2.2

1.打开终端
2 移除现有 Ruby 默认源 输入以下指令
$gem sources –remove https://rubygems.org/

3.使用新的源 输入以下指令
$gem sources -a https://ruby.taobao.org/

4.验证新源是否替换成功 输入以下指令
$gem sources -l

5.安装 CocoaPods
$sudo gem install cocoa pods

//–––––––––––那么问题来了——没遇到的自动跳过————————————

错误提示1
Error installing cocoapods: activesupport requires Ruby version >= 2.2.2.

解决方案 :
1、安装 RVM baby 版本管理器

$curl -L get.rvm.io | bash -s stable

//等安装完成 出现下面这行提示以下___

In case of problems: https://rvm.io/helpandhttps://twitter.com/rvm_io

执行

$source ~/.bashrc

$source ~/.bash_profile

测试是否安装正常

$rvm -v

//提示以下___

rvm 1.27.0 (latest) by Wayne E. Seguin, Michal Papis[https://rvm.io/]

2、用RVM升级Ruby查看当前ruby版本

$ruby -v

$rvm list known

//提示以下___

MRI Rubies

[ruby-]1.8.6[-p420]

[ruby-]1.8.7[-head] # security released on head

[ruby-]1.9.1[-p431]

[ruby-]1.9.2[-p330]

[ruby-]1.9.3[-p551]

[ruby-]2.0.0[-p648]

[ruby-]2.1[.8]

[ruby-]2.2[.4]

[ruby-]2.3[.0]

[ruby-]2.2-headruby-head

for forks use: rvm install ruby-head—url https://github.com/github/ruby.git –branch 2.2

JRuby

安装ruby 2.2.2 执行

$rvm install 2.2.24. 继续安装 CocoaPods

$sudo gem install cocoa pods

$sudo gem install -n /usr/local/bin cocoapods

$pod setup

  1. 更新 gem
    $sudo gem update –system

  2. 新建一个项目,名字PodTest

  3. $ cd 项目路径 (中间有空格,)
    cd /Users/lucky/Desktop/PodTest

  4. 建立Podfile(配置文件)
    $vim Podfile

键盘输入 i 进入编辑模式,输入

platform :ios, ‘7.0’

pod ‘MBProgressHUD’, ‘~> 0.8’ (之前的,我的电脑上已经无效了,报错: [!] The dependency MBProgressHUD (~> 0.8) is not used in any concrete target.)

(现在使用:MyApp 替换成自己的项目名)

target ‘MyApp’ do

pod ‘AFNetworking’, ‘~> 2.6’

pod ‘ORStackView’, ‘~> 3.0’

end

ERROR: Could not find a version that satisfies the requirement numpy>=1.14.3. This error message indicates that the required version of numpy (>=1.14.3) could not be found or installed. The reason for this error could be that your current numpy version is lower than the required version. To resolve this issue, you can try upgrading numpy to a version that meets the requirement. However, please note that upgrading numpy may also require updating other dependencies, such as pip, to ensure compatibility. Alternatively, you can try installing a specific version of numpy that satisfies the requirement. You can specify the version in the installation command using the following syntax: "pip install numpy==<desired_version>". For example, if you want to install numpy version 1.20.0, you can run "pip install numpy==1.20.0". If you encounter any further errors or difficulties during the installation process, please provide more details about the specific error message or the steps you have taken so far. This will help to provide more accurate guidance on resolving the issue.<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Could not find a version that satisfies the requirement numpy>=1.20.0 (from imageio) 解决办法](https://blog.csdn.net/m0_59822830/article/details/125097129)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [配置 MLTP:win10+PyCharm+conda](https://blog.csdn.net/qq_43611382/article/details/124877862)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值