我想使用zsh5而不是旧的4。
它下载了5.0.2tar并成功安装,但是在我重新启动iTerm2之后,输入
zsh --version
它还在向我展示
zsh 4.3.11 (i386-apple-darwin12.0)
我不记得我是如何安装4的,所以不知道如何卸载它?我如何删除4和使用5作为默认?
当我查看/usr/local/Cellar/zsh/5.0.2/bin/时,我看到两个文件:zsh zsh-5.0.2
我应该将zsh-5.0.2链接到/bin/zsh吗?
发布于 2013-07-30 08:57:49
您以前的zsh版本可能位于路径中的位置,其优先级高于自制安装。
$ which zsh # Check what path zsh refers to
/usr/local/bin/zsh
$ ls `which zsh` # It may be a link to homebrew's cellar
lrwxr-xr-x ... /usr/local/bin/zsh -> ../Cellar/zsh/5.0.2/bin/zsh
$ echo $PATH # Make sure /usr/local is before other places in you $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin您还可以检查已安装的版本,以及当前使用brew info进行活动的版本,如下所示。在本例中,安装了两个版本的node,当前选择了0.10.13 (参见*)
$ brew info node
node: stable 0.10.13, devel 0.11.4, HEAD
http://nodejs.org/
/usr/local/Cellar/node/0.10.12 (1104 files, 16M)
Built from source
/usr/local/Cellar/node/0.10.13 (1085 files, 15M) *
Built from source如果brew确实列出了多个版本,则可以使用本例中的brew switch node 0.10.12在它们之间切换。
https://stackoverflow.com/questions/17941929
复制相似问题