2012-01-13 10 views
3

node.jsの世界への進入基本的にはちょうど出発。私はノードをインストールしていくつかのことが働いている。私の理解から、モジュールjsdomをインストールしてjQueryを動作させる必要があります。そこでNPMをダウンロードしてコンパイルして、npm install jsdomコマンドを実行したときに、私は大量のエラーを取り戻しました。ここにプリントアウトがあります:NPMとjsdomの読み込みエラー

npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url'] 

> [email protected] preinstall /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify 
> node-waf clean || true; node-waf configure build 

Nothing to clean (project not configured) 
Setting srcdir to      : /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify 
Setting blddir to      : /usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/build 
Checking for program g++ or c++   : not found 
Checking for program icpc    : not found 
Checking for program c++     : not found 
/usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/wscript:11: error: could not configure a cxx compiler! 
npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build` 
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1 
npm ERR! error installing [email protected]  at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20) 
npm ERR! error installing [email protected]  at ChildProcess.emit (events.js:70:17) 
npm ERR! error installing [email protected]  at maybeExit (child_process.js:359:16) 
npm ERR! error installing [email protected]  at Process.onexit (child_process.js:395:5) 
npm ERR! error installing [email protected] Error: [email protected] preinstall: `node-waf clean || true; node-waf configure build` 
npm ERR! error installing [email protected] `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1 
npm ERR! error installing [email protected]  at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20) 
npm ERR! error installing [email protected]  at ChildProcess.emit (events.js:70:17) 
npm ERR! error installing [email protected]  at maybeExit (child_process.js:359:16) 
npm ERR! error installing [email protected]  at Process.onexit (child_process.js:395:5) 
npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build` 
npm ERR! `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1 
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script. 
npm ERR! This is most likely a problem with the contextify package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-waf clean || true; node-waf configure build 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls contextify 
npm ERR! There is likely additional logging output above. 
npm ERR! 
npm ERR! System Linux 2.6.35-27-virtual 
npm ERR! command "node" "/usr/bin/npm" "install" "jsdom" 
npm ERR! cwd /usr/lib/nodejs/npm/node_modules 
npm ERR! node -v v0.6.2 
npm ERR! npm -v 1.0.105 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /usr/lib/nodejs/npm/node_modules/npm-debug.log 
npm not ok 

明らかにうまくいきませんでした。

  1. jQueryを実行するにはこのパッケージが必要ですか?
  2. 私はここで間違っていますか?

ありがとうございます。

+0

C++コンパイラなしでどのようにノードを構築したのだろうか... –

答えて

1
Checking for program g++ or c++   : not found 

コンパイルに必要な基本的なものはインストールしていません。他のディストリビューションについては

sudo apt-get install build-essential 

は、コマンドは多少異なりますが、基本的な原理は同じです:DebianとUbuntuの上で、これはそれを修正する必要があります。

関連する問題