最近,在运行Flutter项目的时候,报了如下一个错误:
You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it
意思是,安装了CocoaPods,但它不工作。如果安装CocoaPods的Ruby版本与用于调用它的版本不同,就会发生这种情况。对于上面这个问题,我们只需要下面几步就可以解决: 1,首先查看CocoaPods的版本。
pod --version
如果没有安装,使用下面的命令安装:
sudo gem install cocoapods
如果是Flutter,还可以能会报如下错误:If with sudo its failing,First download and install brew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
,此时需要运行如下命令:
brew install cocoapods
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有