我試圖安裝socket.io使用上beaglebone(Linux的埃)NPM使用node.js v0.6.18安裝socket.io。 WS failes在安裝過程中
/> NPM安裝socket.io
它與舊內核的舊版本節點的工作很大。我現在使用節點v0.6.18。
似乎是在NPM特林安裝這應該與socket.io
我得到同樣的錯誤安裝WS一個問題,如果我嘗試:
npm install ws --ws:verbose
下面是結果:
[email protected]:~# npm install ws --ws:verbose
npm http GET https://registry.npmjs.org/ws
npm http 304 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/tinycolor
npm http GET https://registry.npmjs.org/options
npm http 304 https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/tinycolor
npm http 304 https://registry.npmjs.org/options
> [email protected] install /home/root/node_modules/ws
> node install.js
[ws v0.4.18] Attempting to compile blazing fast native extensions.
info it worked if it ends with ok
spawn python [ '/home/root/.node-gyp/0.6.18/tools/gyp_addon',
'binding.gyp',
'-I/home/root/node_modules/ws/build/config.gypi',
'-f',
'make' ]
Traceback (most recent call last):
File "/home/root/.node-gyp/0.6.18/tools/gyp_addon", line 14, in <module>
import gyp
File "/home/root/.node-gyp/0.6.18/tools/gyp/pylib/gyp/__init__.py", line 8, in <module>
import gyp.input
File "/home/root/.node-gyp/0.6.18/tools/gyp/pylib/gyp/input.py", line 5, in <module>
from compiler.ast import Const
ImportError: No module named compiler.ast
ERR! Error: `gyp_addon` failed with exit code: 1
at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:226:16)
at ChildProcess.emit (events.js:70:17)
at maybeExit (child_process.js:362:16)
at Process.onexit (child_process.js:398:5)
ERR! not ok
[ws v0.4.18] Native extension compilation failed.
[ws v0.4.18] On Windows, native extensions require Visual Studio and Python.
[ws v0.4.18] On Unix, native extensions require Python, make and a C++ compiler.
[ws v0.4.18] Start npm with --ws:verbose to show compilation output (if any).
[email protected] ./node_modules/ws
├── [email protected]
├── [email protected]
└── [email protected]
[email protected]:~#
我使用的內核3.2.18
[email protected]:~# uname -a
Linux beaglebone 3.2.18 #1 Thu Jun 14 23:26:20 CEST 2012 armv7l GNU/Linux
[email protected]:~#
有什麼想法?
你是對的,我試過我的應用程序,它使用socket.io,儘管出現這種錯誤,但它工作正常。 – Seeker
我如何安裝ws?我無法弄清楚爲什麼我得到這個錯誤。 – Seeker
在http://github.com/tootallnate/node-gyp報告問題。我從來沒有見過node-gyp的錯誤。 – einaros