Help us understand the problem. What is going on with this article?

MacにRedisさんをインストールする

More than 5 years have passed since last update.

memcachedよりよさそうなKVSのRedisをHomebrewを使ってインストールする。

$ brew update
$ brew install redis
Error: Failed executing: make -C src 
If `brew doctor' does not help diagnose the issue, please report the bug:
    https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue

エラー出て、brew doctor で調べてって言われた。

$ brew doctor redis
We couldn't detect gcc 4.2.x. Some formulae require this compiler.
NOTE: Versions of XCode newer than 4.2 don't include gcc 4.2.x.

==> /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. This is an issue if you eg. brew installed Python.

Consider editing your .bashrc to put:
  /usr/local/bin
ahead of /usr/bin in your PATH.
Some "config" scripts were found in your path, but not in system or Homebrew folders.

`./configure` scripts often look for *-config scripts to determine if software packages
are installed, and what additional flags to use when compiling and linking.

Having additional scripts in your path can confuse software installed via Homebrew if
the config script overrides a system or Homebrew provided script of the same name.

/Applications/MAMP/Library/bin
    curl-config freetype-config libmcrypt-config libpng-config libpng15-config sablot-config xml2-config xslt-config yaz-config

/usr/local/bin を /usr/bin より前にしてって言われたので、.bashrc で $PATH の順番を変更。

$ brew install redis
==> Downloading http://redis.googlecode.com/files/redis-2.4.6.tar.gz
File already downloaded in /Users/suin/Library/Caches/Homebrew
==> make -C src
==> Caveats
If this is your first install, automatically load on login with:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/redis/2.4.6/io.redis.redis-server.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/io.redis.redis-server.plist

If this is an upgrade and you already have the io.redis.redis-server.plist loaded:
    launchctl unload -w ~/Library/LaunchAgents/io.redis.redis-server.plist
    cp /usr/local/Cellar/redis/2.4.6/io.redis.redis-server.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/io.redis.redis-server.plist

  To start redis manually:
    redis-server /usr/local/etc/redis.conf

  To access the server:
    redis-cli
==> Summary
/usr/local/Cellar/redis/2.4.6: 9 files, 460K, built in 3 seconds

できた

suin
Qiita 4位/TypeScript入門書執筆中/TypeScripterのための座談会「YYTypeScript」主催/『実践ドメイン駆動設計』書籍邦訳レビュア/分報Slack考案/YYPHP主催/CodeIQマガジン執筆/株式会社クラフトマンソフトウェア創設/Web自動テスト「ShouldBee」の開発/TypeScript/DDD/OOP
https://yyts.connpass.com/
craftsman_software
「インフラの心配は、もうおしまい」 インフラ運用を自動化し、手作業を限りなくゼロにする会社
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away