简体   繁体   English

不能用 n 更改版本

[英]Can't change version with n

I have first installed npm via the ubuntu package manager (ubuntu 12).我首先通过 ubuntu 包管理器(ubuntu 12)安装了 npm。 It installed a first node version.它安装了第一个节点版本。 Then I installed n, and two different versions with n.然后我安装了 n,以及两个不同版本的 n。 However when I type n instead of the choice for a version I have the following line : /home/vagrant/bin/node Any idea ?但是,当我键入 n 而不是版本的选择时,我有以下行: /home/vagrant/bin/node知道吗?

Edit : The result of n ls :编辑: n ls 的结果:

vagrant@precise32:~$ n ls
/home/vagrant/bin/node

0.8.6
0.8.7
0.8.8
0.8.9
0.8.10
0.8.11
0.8.12
0.8.13
0.8.14
0.8.15
0.8.16
0.8.17
0.8.18
0.8.19
0.8.20
0.8.21
0.8.22
0.8.23
0.8.24
0.8.25
0.8.26
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.9.5
0.9.6
0.9.7
0.9.8
0.9.9
0.9.10
0.9.11
0.9.12
0.10.0
0.10.1
0.10.2
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.10.10
0.10.11
0.10.12
0.10.13
0.10.14
0.10.15
0.10.16
0.10.17
0.10.18
0.10.19
ο **0.10.20** 
0.10.21
0.11.0
0.11.1
0.11.2
0.11.3
0.11.4
0.11.5
0.11.6
**0.11.7** 

when I do node --version I have this result:当我做 node --version 我有这个结果:

v0.10.20
$ sudo n stable

or或者

$ sudo n latest

or或者

$ sudo n <VersionNumber>

$ n

select the version with the arrow and hit Enter exit the terminal and open it agina.选择带有箭头的版本,然后按 Enter 退出终端并在 agina 中打开它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM