3
노드 (0.8.11)의 최신 버전을 사용하는 OS x Mountain Lion에서 npm을 구할 수 없습니다. 소스에서 빌드하거나 설치 프로그램을 사용하여 npm을 실행하려고 할 때 명령을 찾을 수 없습니다. 나는/usr/local/bin을 확인하고 NPM이 존재, 여기에/usr/지방/lib 디렉토리/node_modules/NPM/빈에 따라문제 Mac에서 npm 설치
lrwxr-xr-x 1 root wheel 38 Oct 2 16:33 npm -> ../lib/node_modules/npm/bin/npm-cli.js
-l 니오븀은
drwxr-xr-x 4 24561 staff 136 Oct 2 16:33 node-gyp-bin
-rwxr-xr-x 1 root staff 274 Sep 27 12:39 npm
-rwxr-xr-x 1 root staff 2247 Sep 27 12:39 npm-cli.js
-rw-r--r-- 1 root staff 209 Sep 27 12:39 npm.cmd
-rwxr-xr-x 1 root staff 504 Sep 27 12:39 read-package-json.js
'실행하는 경우를 보여줍니다이다
bash:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin: No such file or directory
: 소스에서 make install '에, 나는 다음과 같은 오류가 발생합니다
symlinking ../lib/node_modules/npm/bin/npm-cli.js -> /usr/local/bin/npm
updating shebang of /usr/local/bin/npm to /usr/local/bin/node
Traceback (most recent call last):
File "tools/install.py", line 225, in <module>
run(sys.argv[:])
File "tools/install.py", line 220, in run
if cmd == 'install': return files(install)
File "tools/install.py", line 203, in files
if 'true' == variables.get('node_install_npm'): npm_files(action)
File "tools/install.py", line 166, in npm_files
update_shebang(link_path, shebang)
File "tools/install.py", line 133, in update_shebang
s = open(path, 'r').read()
IOError: [Errno 2] No such file or directory: '/usr/local/bin/npm'
make: *** [install] Error 1
내 경로는 다음과 같다 얻을
설치 프로그램이 오류없이 원활하게 실행되지만 여전히 npm을 실행하지 않습니다. 어떤 도움을 주셔서 감사합니다!
Mountain Lion에 없지만 MacPorts가 정상적으로 작동합니다. 너 해봤 어? – eWolf
그래, 사실 MacPorts 사용을 끝내고 완벽하게 작동했습니다. – user1715403
'/ usr/local/bin/npm'은 'node'를 사용하여 실행하려고하는 JavaScript 스크립트입니다 (표준 'shebang'연습을 사용하여 찾습니다)./usr/bin/env 노드). PATH에 어딘가에 '노드'가 있습니까?/usr/local/bin에 있다고 가정하지만 어쩌면 아닙니다. – ravi