我已经注意到这种情况发生了几次,但最近的这个实例是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.0。 brew info
和wp --version
都返回0.20.1
。为什么Homebrew不抓住最新版本?如何强制它获取最新信息?
答案 0 :(得分:4)
您需要先运行brew update
强制brew更新其公式列表。