系统环境: ubutnu 14.04
主要变化有:
命令提示符由 node 改为 nodejs
$ node --version
$ nodejs --version
v0.10.25
这样导致 npm(通过$ curl -L http://npmjs.org/install.sh |sudo sh
来安装)安装出现如下问题:
$ sudo /bin/bash install.sh
[sudo] password for pabb:
tar=/bin/tar
version:
tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You need Node.js to run this program.
node --version reports:
with exit code = 1
Please install Node.js before continuing.
一个修改方法为:
修改install.sh 文件,
53 # make sure that Node.js exists
54 node=`which nodejs 2>&1`
55 #node=`which node 2>&1`
56 ret=$?
$ sudo /bin/bash install.sh
tar=/bin/tar
version:
tar (GNU tar) 1.27.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
install npm@latest
fetching: http://registry.npmjs.org/npm/-/npm-3.8.8.tgz
/usr/bin/npm -> /usr/lib/node_modules/npm/bin/npm-cli.js
/usr/lib
└─┬ npm@3.8.8
├── abbrev@1.0.7
├── ansi-regex@2.0.0
安装npm 之后,npm 还是无法使用