MacにArangoDBをインストールしようと思ったら何やらHomebrewからどうぞ!*1みたいな感じだったので、そういえば以前インストールしたきりだったし折角だから使ってみよう、と動かしてみた所幾らか引っかかった事がありました。とりあえずそれらを簡単に纏めてみます。
備忘録として残す為に書いており、結構アホっぽい事やってると自分でも思うので適当に読み流していただければと思います。
バージョンが最新じゃなかった
早速brew install arangodb
を実行してみたら
... ==> Installing arangodb ==> Downloading https://www.arangodb.org/repositories/Source/ArangoDB-1.4.12.tar.gz ...
と1.4.12がダウンロードされ始めました(実行した2014/3/30時点で最新版は2.0)。
あるえー?と思いながらチュートリアル系の記事をググっていたら、私のbrewが更新されていない事が原因だとわかりました。
...そういえばbrewをインストールしてから何もしてなかったなあ。
brew update
で解決。
$ brew update Updated Homebrew from 01a7261a to e0746ddb. ... $brew install arangodb ... ==> Installing arangodb ==> Downloading https://www.arangodb.org/repositories/Source/ArangoDB-2.0.0.tar.gz ... ==> Summary 🍺 /usr/local/Cellar/arangodb/2.0.0: 1886 files, 261M, built in 7.2 minutes
brew導入以前にインストールしていたものが気になるようです
読んだ記事の中で「brewをインストールしたらまずbrew doctor
しましょうってあるししましょう」みたいな事が書いてありました。
インストール時に流れた文章に全く目を通してなかったものでそんな事が書いてあった事に気づかず放置してたんですねえ。
で、してみた所結構な数のWARNINGが出てきました。読んだ感じ大体がbrew導入以前からあったPythonとそれに関係するファイル(というかTcl/Tk関係)が原因だったようです。
こちらなどを参考にしつつ対処していきました。
Tcl/Tk関係はUnbrewedなのが見つかったよーという報告でした。
Warning: Unbrewed dylibs were found in /usr/local/lib. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted. Unexpected dylibs: /usr/local/lib/libtcl8.6.dylib /usr/local/lib/libtk8.6.dylib
などなど。
そいつらを削除する事で解決...したのでしょうか?
GitHubにあったissueもあまりはっきりした回答ではないですし。
Pythonに関してはbrew管轄外にあるからbrewで対応できないよ!みたいな感じですかねえ。
Warning: Python is installed at /Library/Frameworks/Python.framework Homebrew only supports building against the System-provided Python or a brewed Python. In particular, Pythons installed to /Library can interfere with other software installs.
こちらも折角という事でLibrary下にあるPythonを削除してbrewで扱う事にしました。
symlink
ついでにTcl/Tkもbrewで扱おうと言う事でインストール。その後brew doctor
を見ると
Warning: Broken symlinks were found. Remove them with `brew prune`: /usr/local/bin/pyvenv-3.3 /usr/local/bin/pythonw3.3-32 /usr/local/bin/pythonw3.3 /usr/local/bin/pythonw3-32 /usr/local/bin/pythonw3 /usr/local/bin/python3.4-32 /usr/local/bin/python3.3m-config /usr/local/bin/python3.3m /usr/local/bin/python3.3-config /usr/local/bin/python3.3-32 /usr/local/bin/python3.3 /usr/local/bin/python3-32 /usr/local/bin/pydoc3.3 /usr/local/bin/idle3.3 /usr/local/bin/2to3-3.3 /usr/local/bin/2to3
インストールされていないものに対するシンボリックリンクが存在した場合の警告のようですね。
書いてある通りbrew prune
で解決。
$ brew prune Pruned 0 dead formula Tapped 38 formula Pruned 16 symbolic links and 3 directories from /usr/local
書き込み不可ディレクトリ
Warning: Some directories in /usr/local/share/man aren't writable. This can happen if you "sudo make install" software that isn't managed by Homebrew. If a brew tries to add locale information to one of these directories, then the install will fail during the link step. You should probably `chown` them: /usr/local/share/man/de /usr/local/share/man/de/man1 /usr/local/share/man/mann
これ。
chown -R <user name>:admin <pass>
で解決。
ArangoDBをインストールするのとは関係ない事が殆どだったなあ...
*1:パッケージを直接ダウンロードする事も出来る