我开始了这个任务,安装了redis/3.0.3,并且希望将我的本地dev redis升级到3.2.3版本,这是我们在生产中运行什么。我最终运行了brew upgrade redis
,它安装了redis 4.0.2,位于我期望的版本之前。然后我发现你可以用brew install [email protected]
安装3.2.x。另外,在尝试清理4.0.2时,它只清理了3.0.3。Homebrew:如何删除redis/4.0.2并使用[email protected]作为我的默认redis
现在我陷入了一种情况,即Homebrew不会允许我卸载redis/4.0.2,并将[email protected]作为单独的Homebrew公式来查看。
$ brew switch redis 3.2
Error: redis does not have a version "3.2" in the Cellar.
Versions available: 4.0.2
了解如何在地窖里,他们才会在此处作为单独的公式:
$ ls /usr/local/Cellar/ | grep redis
redis
[email protected]
什么是正确的 “自制” 的方式来删除的Redis/4.0.2和使用Redis的@ 3.2作为我的默认redis,让命令以redis-server
和redis-cli
参考3.2代替?我使用的是Mac OS X Yosemite 10.10.5和Homebrew 1.3.4。
$ ls -l /usr/local/bin/ | grep redis
lrwxr-xr-x 1 jsoro wheel 41 Oct 5 12:51 redis-benchmark -> ../Cellar/redis/4.0.2/bin/redis-benchmark
lrwxr-xr-x 1 jsoro wheel 41 Oct 5 12:51 redis-check-aof -> ../Cellar/redis/4.0.2/bin/redis-check-aof
lrwxr-xr-x 1 jsoro wheel 41 Oct 5 12:51 redis-check-rdb -> ../Cellar/redis/4.0.2/bin/redis-check-rdb
lrwxr-xr-x 1 jsoro wheel 35 Oct 5 12:51 redis-cli -> ../Cellar/redis/4.0.2/bin/redis-cli
lrwxr-xr-x 1 jsoro wheel 40 Oct 5 12:51 redis-sentinel -> ../Cellar/redis/4.0.2/bin/redis-sentinel
lrwxr-xr-x 1 jsoro wheel 38 Oct 5 12:51 redis-server -> ../Cellar/redis/4.0.2/bin/redis-server
常见问题解答说'brew cleanup'用于删除旧版本的公式;并不是它用来删除任何公式。该任务已经由'brew uninstall'处理,该连接在您所链接的页面上提到,在“如何卸载公式?”下方提到。 – bfontaine
不准确。常见问题解答仅提及使用force标志进行卸载,并明确警告它具有“破坏性”,以阻止使用。而且,由于提及不在代码块中,因此它在页面上相对不可见。 –
的确如此。除非你想这样做,否则我会让公关提出一个更好的措辞/格式。 – bfontaine