のらねこの気まま暮らし

技術系だけど、Qiita向きではないポエムとかを書くめったに更新されないヤツ

mac book air を買ったので環境構築してみる 続

zshをインストール

mizuki-mba:~ mizuki$ brew install zsh
==> Installing zsh dependency: gdbm
==> Downloading http://ftpmirror.gnu.org/gdbm/gdbm-1.10.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/gdbm/1.10 --mandir=/usr/local/Cellar/gdbm/1.10/share/man --infodir=/usr/local/Cellar/gdbm/1.10/share/info
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
checking for C compiler default output file name... 
configure: error: in `/private/tmp/homebrew-gdbm-1.10-CbVC/gdbm-1.10':
configure: error: C compiler cannot create executables
See `config.log' for more details.
config.log was copied to /Users/mizuki/Library/Logs/Homebrew
==> Build Environment
HOMEBREW_VERSION: 0.9.2
HEAD: (none)
CPU: quad-core 64-bit ivybridge
OS X: 10.7.4-x86_64
Xcode: 4.3.3
CLT: N/A
X11: 2.6.4 @ /usr/X11
CC: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CXX: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ => /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
LD: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7
CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7
CPPFLAGS: -isystem /usr/local/include
LDFLAGS: -L/usr/local/lib
MACOSX_DEPLOYMENT_TARGET: 10.7
MAKEFLAGS: -j4
Error: Failed executing: ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gdbm/1.10 --mandir=/usr/local/Cellar/gdbm/1.10/share/man --infodir=/usr/local/Cellar/gdbm/1.10/share/info (gdbm.rb:15)
If `brew doctor` does not, this may help you fix or report the issue:
    https://github.com/mxcl/homebrew/wiki/bug-fixing-checklist
We saved the configure log:
    ~/Library/Logs/Homebrew/config.log
If you report the issue please paste the config.log here:
    http://gist.github.com/

むう。失敗する。

brew doctorしろみたいなことが書いてあるような気がするのでしてみる。

mizuki-mba:~ mizuki$ brew doctor

Error: Experimental support for using Xcode without the "Command Line Tools".

どうやらXcodeコンポーネントが足りてないらしい。
ひまずググると、別途インストールする必要があるとのこと。

Xcodeの初期設定(というほどのものでもないけど

とりあえずXcodeを起動。

初回起動時の「規約に同意しますか?」画面が出てくるので(ry
するとコンポーネントのインストールがはじまる。

ひと通りインストールが終わると、Xcodeがリスタートする。

Xcode Command Line Toolsのインストール

[Xcode] -> [Preferences] -> [download]

Preferencesを開き、downloadを選択。
すると、インストール可能なコンポーネントの一覧があるのでその中から

Command Line Tools

をインストールする。

終わったら再度 brew doctorを走らせてみる。

mizuki-mba:~ mizuki$ brew doctor
Your system is raring to brew.

きたこれ

改めてzshのインストール

mizuki-mba:~ mizuki$ brew install zsh
==> Installing zsh dependency: gdbm
==> Downloading http://ftpmirror.gnu.org/gdbm/gdbm-1.10.tar.gz
Already downloaded: /Library/Caches/Homebrew/gdbm-1.10.tar.gz
==> ./configure --prefix=/usr/local/Cellar/gdbm/1.10 --mandir=/usr/local/Cellar/gdbm/1.10/share/man --infodir=/usr/local/Cellar/gdbm/1.10/share/info
==> make install
/usr/local/Cellar/gdbm/1.10: 10 files, 224K, built in 8 seconds
==> Installing zsh dependency: pcre
==> Downloading ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.31.tar.bz2
######################################################################## 100.0%
######################################################################## 100.0%==> ./configure --prefix=/usr/local/Cellar/pcre/8.31 --enable-utf8 --enable-unicode-properties --enable-pcregrep-libz --enable-pcregrep-libbz2
==> make test
==> make install
/usr/local/Cellar/pcre/8.31: 130 files, 3.2M, built in 43 seconds
==> Installing zsh
==> Downloading http://sourceforge.net/projects/zsh/files/zsh-dev/4.3.17/zsh-4.3.17.tar.gz
######################################################################## 100.0%
==> ./configure --prefix=/usr/local/Cellar/zsh/4.3.17 --enable-fndir=/usr/local/Cellar/zsh/4.3.17/share/zsh/functions --enable-scriptdir=/usr/local/Cellar/zsh/4.3.17/share/zsh/scripts --enable-
==> make install
==> Caveats
To use this build of Zsh as your login shell, add it to /etc/shells.

If you have administrator privileges, you must fix an Apple miss
configuration in Mac OS X 10.7 Lion by renaming /etc/zshenv to
/etc/zprofile, or Zsh will have the wrong PATH when executed
non-interactively by scripts.

Alternatively, install Zsh with /etc disabled:

  brew install --disable-etcdir zsh
==> Summary
/usr/local/Cellar/zsh/4.3.17: 940 files, 8.3M, built in 55 seconds

ひゃっほう

shellをzshに変更

mizuki-mba:~ mizuki$ chpass -s /bin/zsh
Changing shell for mizuki.
Password for mizuki: 

git をインストール

mizuki-mba:~ mizuki$ brew install git
==> Downloading http://git-core.googlecode.com/files/git-1.7.11.3.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-1.7.11.3.tar.gz
==> make prefix=/usr/local/Cellar/git/1.7.11.3 CC=/usr/bin/clang CFLAGS=-Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 LDFLAGS=-L/usr/local/lib install
==> make CC=/usr/bin/clang CFLAGS=-Os -w -pipe -march=native -Qunused-arguments -mmacosx-version-min=10.7 LDFLAGS=-L/usr/local/lib
==> make clean
==> Downloading http://git-core.googlecode.com/files/git-manpages-1.7.11.3.tar.gz
######################################################################## 100.0%
==> Downloading http://git-core.googlecode.com/files/git-htmldocs-1.7.11.3.tar.gz
######################################################################## 100.0%
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

The OS X keychain credential helper has been installed to:
  /usr/local/bin/git-credential-osxkeychain

The 'contrib' directory has been installed to:
  /usr/local/share/git-core/contrib
==> Summary
/usr/local/Cellar/git/1.7.11.3: 1204 files, 23M, built in 38 seconds

ひとまずこんなところですか