mac osx使用brew安装指定版本subversion

先查看有哪些版本

cd /usr/local
brew versions subversion
1.8.4    git checkout ce669eb Library/Formula/subversion.rb
1.8.3    git checkout 9b438ce Library/Formula/subversion.rb
1.8.0    git checkout f56b641 Library/Formula/subversion.rb
1.8.1    git checkout 55577bb Library/Formula/subversion.rb
1.7.10   git checkout 0060dc3 Library/Formula/subversion.rb
1.7.9    git checkout b0e6223 Library/Formula/subversion.rb
1.7.8    git checkout f7a42d2 Library/Formula/subversion.rb
1.7.7    git checkout a6dcc41 Library/Formula/subversion.rb
1.7.6    git checkout 6b8d25f Library/Formula/subversion.rb
1.7.5    git checkout 5d5cd70 Library/Formula/subversion.rb
1.7.4    git checkout dc4245c Library/Formula/subversion.rb
1.7.3    git checkout eb97154 Library/Formula/subversion.rb
1.7.2    git checkout d89bf83 Library/Formula/subversion.rb
1.6.17   git checkout 6e2d550 Library/Formula/subversion.rb
1.6.16   git checkout 83ed494 Library/Formula/subversion.rb

然后我们要安装1.7.10版本,执行

git checkout 0060dc3 Library/Formula/subversion.rb
brew install --universal --java subversion
A universal build was requested, but neon was already built for a single arch.
You may need to `brew rm neon` first.
A universal build was requested, but sqlite was already built for a single arch.
You may need to `brew rm sqlite` first.
brew rm sqlite neon
Uninstalling /usr/local/Cellar/sqlite/3.7.10...
Uninstalling /usr/local/Cellar/neon/0.29.6...
brew install --universal neon sqlite

然后在进行安装

brew install --universal --java subversion

完成后执行

sudo mkdir -p /Library/Java/Extensions
sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib

如果出现Error: No available formula for serf
发现github上的serf.rb不存在了
找到一个历史版本https://raw.github.com/mxcl/homebrew/f689d5232ce824fe6dd4b64df729abfc487a6558/Library/Formula/serf.rb
放入到Library/Formula中就可以安装serf了

如果出现Error: Download failed: http://www.apache.org/dyn/closer.cgi?path=subversion/subversion-1.7.10.tar.bz2
老版本的subversion下载地址都失效了,动手修改subversion.rb对应的下载地址和sha1,superbin修改为Superenv.bin

  1. 暂无评论

  1. 暂无 Trackback

return top