M1电脑上pod update 报错解决方案

针对M1 Mac上`pod update`遇到的问题,提供两种解决方案:1. 在pod命令前添加`arch -x86_64`;2. 卸载并重新安装Ruby和CocoaPods,使用`arch -x86_64`重建ffi和CocoaPods,以确保正常运行。
摘要由CSDN通过智能技术生成

M1电脑上pod update 报错解决方案


错误场景:

在这里插入图片描述

方案一 简单直接的方案

pod命令前添加 arch -x86_64,
如 arch -x86_64 pod update

方案二 重新安装cocoaPods

Answering my own question. I fixed the ffi issue by uninstalling my faulty Ruby version and CocoaPods, then I used the -x86_64 arch to reinstall ffi and CocoaPods.
These are the steps I did to get back to a working state (and to apply the M1 workarounds for ffi):

  1. Uninstall Ruby with: brew uninstall ruby --force
  2. Uninstall CocoaPods. At first, try to list all CocoaPods versions / components with gem list --local | grep cocoapods. Then uninstall them one by one, in my case:
    sudo gem uninstall cocoapods
    sudo gem uninstall cocoapods-core
    sudo gem uninstall cocoapods-downloader
    etc.
  3. As a next step I was able
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值