如何在 macOS Sierra Public Beta 上安装 Redis

Ise*_*chO 5 homebrew redis node.js

我正在尝试使用 Homebrew 为应用程序项目安装 Redis。Homebrew IS 已安装并已更新至最新版本。但是,当我$ brew install redis从终端运行时,我总是遇到相同的错误消息,在下面重新发布。

\n\n
\xe2\x9e\x9c  ~ git:(master) \xe2\x9c\x97 brew install redis\nWarning: You are using OS X 10.12.\nWe do not provide support for this pre-release version.\nYou may encounter build failures or other breakages.\nPlease create pull-requests instead of filing issues.\n==> Downloading http://download.redis.io/releases/redis-3.2.3.tar.gz\nAlready downloaded: /Users/oliverisenrich/Library/Caches/Homebrew/redis-3.2.3.tar.gz\n==> make install PREFIX=/usr/local/Cellar/redis/3.2.3 CC=clang\nLast 15 lines from /Users/oliverisenrich/Library/Logs/Homebrew/redis/01.make:\n#include <stdio.h>\n         ^\nmake[1]: *** [ae.o] Error 1\nmake[1]: *** [anet.o] Error 1\n1 error generated.\n1 error generated.\n1 error generated.\nmake[1]: *** [dict.o] Error 1\nmake[1]: *** [zmalloc.o] Error 1\nmake[1]: *** [sds.o] Error 1\n1 error generated.\nmake[1]: *** [quicklist.o] Error 1\n1 error generated.\nmake[1]: *** [server.o] Error 1\nmake: *** [install] Error 2\n\nREAD THIS: https://git.io/brew-troubleshooting\nIf reporting this issue please do so at (not Homebrew/brew):\n  https://github.com/Homebrew/homebrew-core/issues\n\nWarning: You are using OS X 10.12.\nWe do not provide support for this pre-release version.\nYou may encounter build failures or other breakages.\nPlease create pull-requests instead of filing issues.\n
Run Code Online (Sandbox Code Playgroud)\n\n

错误消息显示给出警告,仅指出不为我的 Mac OS X 版本 (10.12) 提供支持,但并未明确指出无法安装。但是,尝试运行brew services start redis会返回以下消息:

\n\n
\xe2\x9e\x9c  nodj git:(JobsPage) \xe2\x9c\x97 brew services start redis\nService `redis` already started, use `brew services restart redis` to restart.\n
Run Code Online (Sandbox Code Playgroud)\n\n

上面的内容让我相信它已安装。然而,跑步brew info redis回报

\n\n
\xe2\x9e\x9c  nodj git:(JobsPage) \xe2\x9c\x97 brew info redis\nredis: stable 3.2.3, HEAD\nPersistent key-value database, with built-in net interface\nhttp://redis.io/\nNot installed\nFrom: https://github.com/Homebrew/homebrew-core/blob/master/Formula/redis.rb\n==> Options\n--with-jemalloc\n    Select jemalloc as memory allocator when building Redis\n--HEAD\n    Install HEAD version\n==> Caveats\nTo have launchd start redis now and restart at login:\n  brew services start redis\nOr, if you don't want/need a background service you can just run:\n  redis-server /usr/local/etc/redis.conf\n
Run Code Online (Sandbox Code Playgroud)\n\n

是否有任何替代/解决方法可以让 Redis 启动并运行(最好不需要恢复到之前的稳定操作系统版本:

\n

小智 2

现在已经修复了,您可以执行以下操作:

brew update
brew install redis
Run Code Online (Sandbox Code Playgroud)

确认在这里工作。