iOS pod install失败,提示CocoaPods could not find compatible versions for pod “***“

这篇具有很好参考价值的文章主要介绍了iOS pod install失败,提示CocoaPods could not find compatible versions for pod “***“。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

1.pod install失败

在执行pod install的时候会失败,提示如下:

[!] CocoaPods could not find compatible versions for pod "MJRefresh":
  In Podfile:
    MJRefresh (~> 3.5.0)

None of your spec sources contain a spec satisfying the dependency: `MJRefresh (~> 3.5.0)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

按提示执行pod install --repo-update之后,还是失败,提示:

[!] CocoaPods could not find compatible versions for pod "MJRefresh":
  In Podfile:
    MJRefresh (~> 3.5.0)

None of your spec sources contain a spec satisfying the dependency: `MJRefresh (~> 3.5.0)`.

You have either:
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

造成报错的原因有两种:

  • 一、两者的都是由于本地索引库没有更新到最新,找不到对应版本的spec文件。

  • 二、第三方库依赖的系统版本号,高于项目的最低支持版本,要解决只能升级最低支持的版本或者不升级第三方库。这就是为什么pod search成功,但pod install的原因,当然也有可能是某个第三方库也依赖了这个库,不过我记得报错不是这样的,会提示某个库依赖这个库的某个版本。

第一种按如下方法执行:

// 以本地master的实际目录为准:
cd ~/.cocoapods/repos/master
Git pull

执行完这两个命令之后,再执行pod install即可,参考

不过以上方法可能比较耗时,并且下载了很长时间也会失败,这里推荐你使用第三步中的方法,方便不耗时!

2.cocoapods升级

执行:

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

3.SSL_ERROR_SYSCALL

提示:

error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

主要是cocoapods下载spec文件的速度太慢,个人喜欢到下面的地址直接下载,即Podfile文件的引入源。

https://github.com/CocoaPods/Specs.git

解压完成之后将文件命名为master, 然后打开~/.cocoapods/repos/删除repos文件下的master,将我们下载的master文件替换进来,打开终端执行:

pod setup

完成之后,就可以正常执行pod install操作了。类似下面的报错也可以解决:

fatal: unable to access 'https://github.com/hackiftekhar/IQKeyboardManager.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

以上方法也可以解决类似4435654的问题,如果不能解决参考Pod\Ruby更新提示443

4.日常更新

最近发现还是会有443这类的问题出现,之前都能pod install下来的库,现在升级确不行(个别库,因为新增的能install下来),一直失败报错,有说需要清除本地代理配置:

取消代理

git config --global --unset http.proxy
git config --global --unset https.proxy

之后执行pod install,正常执行,由于升级的库较多,只成功了一次,之后又试了一次pod install,全部更新完毕!

这里有一点问题,因为本地的配置并没有设置过代理,感觉和这个关系也不大。从实际情况来看多执行几次pod install就可以了,并不需要做额外的操作文章来源地址https://www.toymoban.com/news/detail-704713.html

到了这里,关于iOS pod install失败,提示CocoaPods could not find compatible versions for pod “***“的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 排坑日记2:Could not find MSVC/GCC/CLANG installation on this computer.

    MAT: Mask-Aware Transformer for Large Hole Image Inpainting 在复现MAT时,报如下错: Could not find MSVC/GCC/CLANG installation on this computer. Check compiler_bindir_search_path list in “D:projectMAT-maintorch_utilscustom_ops.py\\\". 报错提示custom_ops.py: python 3.6.13 pytorch 1.10.2 cuda 11.3 cudnn 8.0 上面为主要的环境,其余根

    2024年02月17日
    浏览(28)
  • 【2023.4.19】重新安装 Cocoapods 解决 pod install 卡住或者 cocoapods 依赖无法更新等问题

    做ios或flutter开发时,经常会遇到添加依赖过后pod install卡住,或者其他的一些奇奇怪怪的问题,如果花了很长时间都没有解决的话可以试试重新安装Cocoapods,这在大多数情况下都能有所帮助 1. 打开终端 2. which pod 3. gem list 1. 检查 gem 下载源并下载 2. 删除 Podfile 和 Podfile.lock 3

    2024年02月10日
    浏览(31)
  • pip install tensorflow报错ERROR: Could not find a version that satisfies the requirement tensorflow (f

    pip3 install tensorflow 输入上述命令安装tensorflow后出现下面的报错 直接上解决方法 先说我最终解决用的方法 pip3 install tensorflow-hub -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 指定镜像源,使用豆瓣的镜像源进行下载。 还有其他的镜像源可供使用,我第一次用的镜像源是清

    2023年04月16日
    浏览(40)
  • 最新版的 MacOS Catalina 的 CocoaPods 安装步骤 pod install/pod update 更新慢等问题

    当你开发iOS应用时,会经常使用到很多第三方开源类库,比如JSONKit,AFNetWorking等等。如果使 用他们,传统的方法是,在git上把他们下载下来,然后去配置。这个工作很繁琐,而且也容易出错。不 过有了Cocoapods你就会从这些繁琐的工作中解脱出来。 第一步:安装RVM RVM: Ruby

    2024年02月17日
    浏览(36)
  • iOS:解决Could not find a storyboard named ‘LaunchScreen.storyboard‘ in bundle NSBundle

    打开项目的:HBuilder-uniPlugin-Info.plist 删除Launch screen interface file base name 然后看图,清空掉之前的LaunchScreen.storyboard东西  再运行就可以了,我也是改自定基座出的问题略

    2024年02月12日
    浏览(26)
  • pip install d2l提示ERROR: Could not build wheels for pandas

    pip install d2l会报这个错 解决办法: 另一种方法: 去d2l包的官方网站,然后将包下载下来,然后再在cmd窗口安装。 d2l包的官方网站: https://www.cnpython.com/pypi/d2l/download      下载到你的虚拟环境里。然后win+R打开cmd窗口,切换到你的环境路径那里: 像我的文件下载到的路径是

    2024年02月12日
    浏览(42)
  • Python pip install 安装包报错ERROR: Could not find a version that satisfies the requirement XXX解决方法

    使用 pip 安装 python 包时,经常会出现如下错误: 本次在用pip命令(pip install pdf2word)安装pdf2docx包的时候出错 因为后来安装好了,所以故意安装一个错误的pdf2word,来整个图 可能是国内网络不稳定,直接导致报错,而不是环境冲突。报错信息看起来容易把人误导到解决包环境

    2024年01月18日
    浏览(72)
  • springboot web创建失败,解决Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom

    jdk8不支持3.0以上的springboot版本,如果你在创建项目的时候用的是jdk8,那么我建议你在创建好项目之后自行再pom文件里降级,我刚开始接触springboot时,用的是jdk11,导入的springboot版本是2.7.1,然后弄了差不多半天都找不到原因,然后我就扩大了阿里云的搜索地址,自行在pom文

    2024年02月04日
    浏览(34)
  • 报错解决ValueError: did not find a match in any of xarray‘s currently installed IO backends

    最近在服务器上配置环境遇到了xarray读取nc数据的相关问题,折腾了一下午终于解决了,记录下来,希望帮助后来人。具体报错如下 想要解决该问题只需要 两步: 【1】下载相关依赖包 ​​​​​​​ 可以发现已经明显提示了 缺少IO backends ,可到给出的网址中寻求解答。

    2024年02月02日
    浏览(86)
  • flutter doctor检测环境,出现CocoaPods installed but not working

    1. 安装flutter, 地址: 安装和环境配置 - Flutter 中文文档 - Flutter 中文开发者网站 - Flutter 2. 安装成功后,通过flutter doctor检测环境。以mac为例,出现了 CocoaPods installed but not working 错误提示时,以下为解决方案: 2.1   rvm install ruby-3.1.0, 可能出现依赖错误问题,使用如何指令即可

    2024年02月08日
    浏览(32)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包