如何使用 brew 更新 cocoapod 版本
How to update cocoapod version using brew
我已经通过这个安装了 cocoapods - https://apple.stackexchange.com/questions/418222/installing-cocoapods-to-macos-catalina/418230#418230
已安装 cocoapods v1.5.2。现在我想更新版本到最新的v1.10.0.
所以我用了-
brew upgrade cocoapods
这个我也试过了 -
brew install cocoapods@1.10.0
但我得到了 -
Error: This command updates brew itself, and does not take formula names.
Use `brew upgrade cocoapods` instead.
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew install cocoapods@1.10.0
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "cocoapods@1.10.0".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
也试过这个-
sudo gem install cocoapods
但我的设备仍然无法正常工作。那么如何使用 brew 更新 cocoapods 版本?
自制软件无能为力。
Homebrew 只允许安装 v1.10.1
就我而言,通过将 ruby 更新为 2.7 以安装 cocoapods v1.10.0 来解决此问题。
rvm install ruby-2.7
注意:根据您的 macOS 兼容性使用特定版本的 ruby
我遇到了同样的问题并已解决。这让我很烦恼,因为在网站上 https://formulae.brew.sh/formula/cocoapods 最新的稳定版本是 1.10.1 但 brew 仍然安装了 me1.5.4
通过使用找出问题
brew doctor
我收到以下警告。
有些水龙头不在默认 git 源分支上,可能无法接收
更新。如果这让您感到惊讶,请检查默认分支:
git -C $(brew --repo homebrew/core) 结账大师
然后,按照建议,我做了。 (修复为您带来的相关问题)
git -C $(brew --repo homebrew/core)
然后,brew install cocoapods
为我安装了最新版本。
希望能解决。
对我来说 brew upgrade cocoapods
显示 Warning: cocoapods 1.11.2_2 already installed
,所以我用 brew uninstall cocoapods
卸载了它们,然后用 brew install cocoapods
重新安装,现在 pod --version
显示 1.11.3
我已经通过这个安装了 cocoapods - https://apple.stackexchange.com/questions/418222/installing-cocoapods-to-macos-catalina/418230#418230
已安装 cocoapods v1.5.2。现在我想更新版本到最新的v1.10.0.
所以我用了-
brew upgrade cocoapods
这个我也试过了 -
brew install cocoapods@1.10.0
但我得到了 -
Error: This command updates brew itself, and does not take formula names.
Use `brew upgrade cocoapods` instead.
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew upgrade cocoapods
Fahims-Mac-mini:~ fahimrahman$ brew install cocoapods@1.10.0
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "cocoapods@1.10.0".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
也试过这个-
sudo gem install cocoapods
但我的设备仍然无法正常工作。那么如何使用 brew 更新 cocoapods 版本?
自制软件无能为力。
Homebrew 只允许安装 v1.10.1
就我而言,通过将 ruby 更新为 2.7 以安装 cocoapods v1.10.0 来解决此问题。
rvm install ruby-2.7
注意:根据您的 macOS 兼容性使用特定版本的 ruby
我遇到了同样的问题并已解决。这让我很烦恼,因为在网站上 https://formulae.brew.sh/formula/cocoapods 最新的稳定版本是 1.10.1 但 brew 仍然安装了 me1.5.4
通过使用找出问题
brew doctor
我收到以下警告。 有些水龙头不在默认 git 源分支上,可能无法接收 更新。如果这让您感到惊讶,请检查默认分支: git -C $(brew --repo homebrew/core) 结账大师
然后,按照建议,我做了。 (修复为您带来的相关问题)
git -C $(brew --repo homebrew/core)
然后,brew install cocoapods
为我安装了最新版本。
希望能解决。
对我来说 brew upgrade cocoapods
显示 Warning: cocoapods 1.11.2_2 already installed
,所以我用 brew uninstall cocoapods
卸载了它们,然后用 brew install cocoapods
重新安装,现在 pod --version
显示 1.11.3