gpt4 book ai didi

kubernetes - Homebrew 安装特定版本的 Formula

转载 作者:行者123 更新时间:2023-12-02 11:08:52 25 4
gpt4 key购买 nike

具体来说是kubernetes-cli。我安装的是1.12.0。我需要 1.11.x,但我没有安装它。

我已经审查并尝试了该线程中的每个答案,但没有任何效果:Homebrew install specific version of formula?

我尝试过 brew search 但没有点击版本:

~ brew search kubernetes-cli
==> Formulae
kubernetes-cli ✔

我已经尝试过 brew 版本,但该命令已被删除:

~ brew versions 
Error: Unknown command: versions

我尝试过brew install kubernetes-cli@1.11.0以及.1和.2:

~ brew install kubernetes-cli@1.11.0
Error: No available formula with the name "kubernetes-cli@1.11.0"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

brew switch 要求我安装旧版本,但我没有安装。

~ brew switch kubernetes-cli 1.11.0
Error: kubernetes-cli does not have a version "1.11.0" in the Cellar.
kubernetes-cli installed versions: 1.12.0

最佳答案

  1. 转到 Homebrew git 存储库:https://github.com/Homebrew/homebrew-core/
  2. 确定特定于 kubernetes 1.11.x 版本的提交
  3. 转到Formula文件夹
  4. 打开 kubernetes-cli.rb 的原始版本文件
  5. 复制文件的原始链接 https://raw.githubusercontent.com/Homebrew/homebrew-core/3e8f5503dde7069c5ff49b82d5e1576e6ebe3a5d/Formula/kubernetes-cli.rb
  6. 运行brew install <raw_link>

关于kubernetes - Homebrew 安装特定版本的 Formula,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52921122/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com