Brew Detailed: Http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula
Finally I used the command:
1. View the current node version
$ Ls-l ' which node '
Lrwxr-xr-x 1 cyper admin, 12:09/usr/local/bin/node. /cellar/node/0.12.7/bin/node
2. View all versions that have been installed
$ ls/usr/local/cellar/node*
/usr/local/cellar/node:
0.12.7
/USR/LOCAL/CELLAR/NODE010:
0.10.40
3. View details of a node tag
$ Brew Info Node
or brew info node010
4. If you can find 0.10.40 node from the results of the second step, you can switch directly to the past
$ Brew Switch node010 0.10.40
4. If you have not previously installed version 0.10, you can view all available versions, from here you can find homebrew/versions/node010, which is the version I need to install later.
$brew Search Node
5. Direct installation prompts that you must first unlink the existing symbolic connection
$ Brew Unlink Node
6. After unlink, the installation begins to download and install.
$ Brew Install homebrew/versions/node010
==> installing node010 from Homebrew/homebrew-versions
==> Downloading https://homebrew.bintray.com/bottles-versions/node010-0.10.40.yosemite.bottle.tar.gz
7. View Node
$ node-v
0.10.40
# # #版本切换测试
$ Brew Unlink node010unlinking/usr/local/cellar/node010/0.10.40 ... 6 symlinks removed $ brew Switch node 0.12.7cleaning/usr/local/cellar/node/0.12.76 links created For/usr/local/cellar/no de/0.12.7 $ brew Unlink nodeunlinking/usr/local/cellar/node/0.12.7 ... 7 symlinks removed $ brew Switch node 0.10.40error:node does not has a version "0.10.40" in the Cellar.versions availabl e:0.12.7 $ brew Switch node010 0.10.40cleaning/usr/local/cellar/node010/0.10.405 links created For/usr/local/cellar/no de010/0.10.40 $ node-vv0.10.40
Brew installs the older version of node