我正在使用osx并尝试通过brew安装redis
brew install redis
==> Downloading http://download.redis.io/releases/redis-2.8.17.tar.gz
Already downloaded: /Library/Caches/Homebrew/redis-2.8.17.tar.gz
==> make -C /private/tmp/redis-WEL8AT/redis-2.8.17/src CC=clang
==> Caveats
To have launchd start redis at login:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
Then to load redis now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Or, if you don't want/need launchctl, you can just run:
redis-server /usr/local/etc/redis.conf
==> Summary最后我安装了redis,但是当我以
redis-server /usr/local/etc/redis.conf出现错误消息,
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 54
>>> 'tcp-backlog 511'
Bad directive or wrong number of arguments我从Redis tcp-backlog那里学到了取消注释这一行中的redis.conf。但是在其他行上还有更多的错误再次出现。我该怎么解决呢?
发布于 2015-05-10 19:53:47
检查你是否已经安装了两次redis。在我的案例中,我从anaconda安装了另一个版本为2.6.9的redis:
$ which redis-server
/Users/<username>/anaconda/bin/redis-server
$ redis-server -v
Redis server v=2.6.9 sha=00000000:0 malloc=libc bits=64而Homebrew会将redis-server安装到不同的位置:
$ /usr/local/bin/redis-server -v
Redis server v=3.0.1 sha=00000000:0 malloc=libc bits=64 build=bf58331b4c8133f5因此,要使用homebrew配置文件启动homebrew版本,请执行以下操作
$ /usr/local/bin/redis-server /usr/local/etc/redis.conf发布于 2015-04-27 00:10:53
我也遇到过类似的问题,因为之前的redis版本遗留了一个配置文件。卸载所有redis版本并重新安装最新版本(另外,在安装redis之前不要忘记更新brew ):
brew uninstall redis --force
brew update
brew install redis现在您应该能够启动它了。
https://stackoverflow.com/questions/28398539
复制相似问题