Homebrewでinstall svn が失敗する x 2
Mac OS X Snow Leopardでbrew install subversionがうまく動かなかったので、対処方法のメモです。
$ brew install svn ==> Downloading http://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.7.9.tar.bz2 Already downloaded: /Library/Caches/Homebrew/subversion-1.7.9.tar.bz2 ==> ./configure --prefix=/usr/local/Cellar/subversion/1.7.9 --with-apr=/usr/bin --with-ssl --with-zlib=/usr --with-sqlite=/usr/local/opt/sqlite --with ==> make _svn_cl__edit_string_externally in util.o _svn_cl__edit_string_externally in util.o ld: symbol(s) not found collect2: ld returned 1 exit status make: *** [subversion/svn/svn] Error 1 READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting These open issues may also help: https://github.com/mxcl/homebrew/issues/17613 https://github.com/mxcl/homebrew/pull/19100 https://github.com/mxcl/homebrew/issues/15393
この問題に当たったようです。
https://github.com/mxcl/homebrew/issues/14884
要はすでにApache (httpd)が入っているとsubversionがbrew installできない、ということなのでApacheを抜いてやりなおします。
$ brew uninstall httpd $ brew cleanup httpd
$ brew install svn ==> Downloading http://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.7.9.tar.bz2 Already downloaded: /Library/Caches/Homebrew/subversion-1.7.9.tar.bz2 ==> ./configure --prefix=/usr/local/Cellar/subversion/1.7.9 --with-apr=/usr/bin --with-ssl --with-zlib=/usr --with-sqlite=/usr/local/opt/sqlite --with ==> make ==> make install ==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d ==> Summary /usr/local/Cellar/subversion/1.7.9: 98 files, 7.6M, built in 4.3 minutes
$ brew install httpd
これでSubversionが入ってめでたし、と思いきやserfがリンクに失敗していて動きません。
$ svn --version dyld: Library not loaded: /usr/local/lib/libsqlite3.0.8.6.dylib Referenced from: /usr/local/lib/libserf-1.0.0.0.dylib Reason: image not found Trace/BPT trap
解決方法は色々ありますが、brew uninstall/cleanup/install serfで入れ直すのが楽でしょう。
バッドノウハウの見本です。
neonで失敗するケースもあるようです。
このあたりを参照。
https://github.com/mxcl/homebrew/issues/17172
HomebrewはGitHubに情報がまとまっているので検索しやすいのがいいですね。
$ svn --version svn, version 1.7.9 (r1462340) compiled Apr 15 2013, 22:47:13 Copyright (C) 2013 The Apache Software Foundation. This software consists of contributions made by many people; see the NOTICE file for more information. Subversion is open source software, see http://subversion.apache.org/
無事に入りました。
Leopard->Snow Leopardのアップグレードをした上に途中でMacPortからHomebrewに移行したMacBookPro (Core2Duo!)を使っているので、パッケージ・リンクまわりはちょくちょくコケます。
その度にOS再インストールして全部入れ直すかいっそ買い替えたい欲求にかられますが、そんなテスト前症候群さえやりすごせば普段はサクサク動くのでまだいけるかな。
ただセキュリティ的にSnow Leopardはそろそろやめた方がいいんでしょうね。