brew upgrade <package>不会更新到最新版本

时间:2016-05-03 22:05:22

标签: homebrew wp-cli

我已经注意到这种情况发生了几次,但最近的这个实例是wp-cli正在运行brew upgrade wp-cli并未下载最新版本。

$ brew upgrade wp-cli
Error: homebrew/php/wp-cli 0.20.1 already installed

$ brew info wp-cli
homebrew/php/wp-cli: stable 0.20.1, HEAD
A set of command-line tools for managing WordPress installations.
http://wp-cli.org/
/usr/local/Cellar/wp-cli/0.20.1 (2635 files, 15M) *
  Built from source
From: https://github.com/Homebrew/homebrew-php/blob/master/Formula/wp-cli.rb

请注意版本为0.20.1。当我查看the formula repo时,我明白了,

head "https://github.com/wp-cli/wp-cli.git"

当我检查that repo时,我发现主分支中的版本是0.24.0brew infowp --version都返回0.20.1。为什么Homebrew不抓住最新版本?如何强制它获取最新信息?

1 个答案:

答案 0 :(得分:4)

您需要先运行brew update强制brew更新其公式列表。