自酿-如何安装较旧的版本 [英] homebrew - how to install older versions
问题描述
我正在尝试使用旧版本(例如:1.4.5)安装memcached,但是我不确定该怎么做.
I'm trying to install memcached with older versions (ex: 1.4.5) but I'm not sure how to do it.
brew install memcached
安装最新版本.
我也尝试过brew install memecached1.4.5
,但是没有用.
I also tried brew install memecached1.4.5
but it didn't work.
推荐答案
通常,您可以检查是否有多个版本,并可以使用@指定版本.例如brew install package@2.8
Usually, you can check if multiple versions are available and you can specify the version with @. e.g. brew install package@2.8
$ brew info memcached
memcached: stable 1.4.24
High performance, distributed memory object caching system
https://memcached.org/
Conflicts with:
mysql-cluster (because both install `bin/memcached`)
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/memcached.rb
...
如果没有可用的版本,可以转到存储库,并检查历史记录
If is not available the version you want you can go to the repo, and check the history
cd "$(brew --repo homebrew/core)"
git log master -- Formula/memcached.rb
然后您可以找到要查找的提交
Then you can find the commit you are looking for
commit 5ec463decefeaab3d1825b923ad2dbee73ffc6dc
Author: Adam Vandenberg <flangy@gmail.com>
Date: Fri Apr 9 21:19:48 2010 -0700
Update memcached to 1.4.5
签出该版本并安装:
cd "$(brew --repo homebrew/core)" && git checkout 5ec463decefeaab3d1825b923ad2dbee73ffc6dc
HOMEBREW_NO_AUTO_UPDATE=1 brew install memcached
一旦安装了版本,就可以通过以下方式将brew升级到最新版本:
Once you get the version installed, you can bring brew to its latest version with:
git checkout master
就这样!
这篇关于自酿-如何安装较旧的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!