我正在使用 Mac OS X Lion 10.7,并homebrew
在自定义路径中使用备用安装进行安装,以保持其用户范围不需要sudo
. 我安装node.js
成功。但是npm
没有被安装。
Last login: Tue Nov 29 10:26:51 on ttys003
Hoons-MacBook-Air:~ Eonil$ node --version
v0.6.2
Hoons-MacBook-Air:~ Eonil$ node
>
(^C again to quit)
> Hoons-MacBook-Air:~ Eonil$ curl http://npmjs.org/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7184 100 7184 0 0 4581 0 0:00:01 0:00:01 --:--:-- 19363
npm cannot be installed without nodejs.
Install node first, and then try again.
Maybe node is installed, but not in the PATH?
Note that running as sudo can change envs.
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:~/Unix/homebrew/bin
Hoons-MacBook-Air:~ Eonil$ ls ~/Unix/homebrew/bin/
brew node node-waf
Hoons-MacBook-Air:~ Eonil$
我看到二进制文件的路径node
被添加到$PATH
变量中。我不知道为什么npm
抱怨。我怎样才能让它被安装?