Homebrew是OSX下最好的包管理工具了吧。可以很方便地查找和安装软件。
软件默认安装的基本都是最新版的软件,怎么安装老版本的软件呢。
很简单,以安装老版本svn为例:
1执行下面命令得到 svn 各版本对应的 git 命令
brew versions svn 1.8.3 git checkout 89853fa /usr/local/Library/Formula/subversion.rb 1.8.0 git checkout f56b641 /usr/local/Library/Formula/subversion.rb 1.8.1 git checkout 55577bb /usr/local/Library/Formula/subversion.rb 1.7.10 git checkout 0060dc3 /usr/local/Library/Formula/subversion.rb 1.7.9 git checkout b0e6223 /usr/local/Library/Formula/subversion.rb 1.7.8 git checkout f7a42d2 /usr/local/Library/Formula/subversion.rb 1.7.7 git checkout a6dcc41 /usr/local/Library/Formula/subversion.rb 1.7.6 git checkout 6b8d25f /usr/local/Library/Formula/subversion.rb 1.7.5 git checkout 5d5cd70 /usr/local/Library/Formula/subversion.rb 1.7.4 git checkout dc4245c /usr/local/Library/Formula/subversion.rb 1.7.3 git checkout eb97154 /usr/local/Library/Formula/subversion.rb 1.7.2 git checkout d89bf83 /usr/local/Library/Formula/subversion.rb 1.6.17 git checkout 6e2d550 /usr/local/Library/Formula/subversion.rb 1.6.16 git checkout 83ed494 /usr/local/Library/Formula/subversion.rb 1.6.15 git checkout 809a18a /usr/local/Library/Formula/subversion.rb 1.6.13 git checkout 7871a99 /usr/local/Library/Formula/subversion.rb 1.6.12 git checkout c99b3ac /usr/local/Library/Formula/subversion.rb 1.6.6 git checkout 8774131 /usr/local/Library/Formula/subversion.rb
2如果已经安装有新版svn程序,执行
brew unlink svn
没有的话跳过这步。
3执行1中得到的所需要版本 svn 对应的 git 命令,如要安装1.7.8版的svn
git checkout f7a42d2 /usr/local/Library/Formula/subversion.rb
4安装svn
brew install svn
就这样。