Node.js NPM和jsdom错误加载

Node.js NPM和jsdom错误加载,node.js,npm,jsdom,Node.js,Npm,Jsdom,进入node.js的世界。基本上刚刚开始。我已经安装了node,并使一些东西正常工作。据我所知,我需要安装模块jsdom以使jQuery工作。因此,我下载并编译了NPM,当我运行NPM install jsdom命令时,返回了大量错误。这是打印件: npm WARN htmlparser@1.7.3 package.json: bugs['web'] should probably be bugs['url'] > contextify@0.0.7 preinstall /usr/lib

进入node.js的世界。基本上刚刚开始。我已经安装了node,并使一些东西正常工作。据我所知,我需要安装模块jsdom以使jQuery工作。因此,我下载并编译了NPM,当我运行NPM install jsdom命令时,返回了大量错误。这是打印件:

npm WARN htmlparser@1.7.3 package.json: bugs['web'] should probably be bugs['url']

> contextify@0.0.7 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 contextify@0.0.7 Error: contextify@0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing contextify@0.0.7 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing contextify@0.0.7     at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing contextify@0.0.7     at ChildProcess.emit (events.js:70:17)
npm ERR! error installing contextify@0.0.7     at maybeExit (child_process.js:359:16)
npm ERR! error installing contextify@0.0.7     at Process.onexit (child_process.js:395:5)
npm ERR! error installing jsdom@0.2.10 Error: contextify@0.0.7 preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! error installing jsdom@0.2.10 `sh "-c" "node-waf clean || true; node-waf configure build"` failed with 1
npm ERR! error installing jsdom@0.2.10     at ChildProcess.<anonymous> (/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm ERR! error installing jsdom@0.2.10     at ChildProcess.emit (events.js:70:17)
npm ERR! error installing jsdom@0.2.10     at maybeExit (child_process.js:359:16)
npm ERR! error installing jsdom@0.2.10     at Process.onexit (child_process.js:395:5)
npm ERR! contextify@0.0.7 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 contextify@0.0.7 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
npm警告htmlparser@1.7.3package.json:bug['web']应该是bug['url']
> contextify@0.0.7预安装/usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify
>节点waf clean | | true;节点waf配置生成
无需清理(项目未配置)
将srcdir设置为:/usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify
将blddir设置为:/usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/build
检查程序g++或C++:没有找到
正在检查程序icpc:未找到
检查程序C++:未找到
/usr/lib/nodejs/npm/node_modules/jsdom/node_modules/contextify/wscript:11:错误:无法配置cxx编译器!
npm错误!安装错误contextify@0.0.7错误:contextify@0.0.7预安装:`node waf clean | | true;节点waf配置生成`
npm错误!安装错误contextify@0.0.7`sh“-c”“node waf clean | | true;node waf configure build”`失败,错误为1
npm错误!安装错误contextify@0.0.7在这个过程中。(/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm错误!安装错误contextify@0.0.7在ChildProcess.emit(events.js:70:17)
npm错误!安装错误contextify@0.0.7在maybeExit(child_process.js:359:16)
npm错误!安装错误contextify@0.0.7在Process.onexit(child_Process.js:395:5)
npm错误!安装错误jsdom@0.2.10错误:contextify@0.0.7预安装:`node waf clean | | true;节点waf配置生成`
npm错误!安装错误jsdom@0.2.10`sh“-c”“node waf clean | | true;node waf configure build”`失败,错误为1
npm错误!安装错误jsdom@0.2.10在这个过程中。(/usr/lib/nodejs/npm/lib/utils/exec.js:49:20)
npm错误!安装错误jsdom@0.2.10在ChildProcess.emit(events.js:70:17)
npm错误!安装错误jsdom@0.2.10在maybeExit(child_process.js:359:16)
npm错误!安装错误jsdom@0.2.10在Process.onexit(child_Process.js:395:5)
npm错误!contextify@0.0.7预安装:`node waf clean | | true;节点waf配置生成`
npm错误`sh“-c”节点waf clean | | true;节点waf配置生成“`失败,错误为1
npm错误!
npm错误!失败contextify@0.0.7预安装脚本。
npm错误!这很可能是contextify包的问题,
npm错误!与npm本身无关。
npm错误!告诉作者此操作在您的系统上失败:
npm错误!节点waf clean | | true;节点waf配置生成
npm错误!您可以通过以下方式获取他们的信息:
npm错误!npm所有者ls上下文化
npm错误!上面可能还有其他日志输出。
npm错误!
npm错误!Linux系统2.6.35-27-virtual
npm错误!命令“node”“/usr/bin/npm”“install”“jsdom”
npm错误!cwd/usr/lib/nodejs/npm/node_模块
npm错误!节点-v v0.6.2
npm错误!净现值-v1.0.105
npm错误!代码失效循环
npm错误!
npm错误!其他日志记录详细信息可在以下位置找到:
npm错误/usr/lib/nodejs/npm/node_modules/npm-debug.log
npm不好
这显然不起作用

  • 我需要这个包来执行jQuery吗
  • 我做错了什么
  • 谢谢

    Checking for program g++ or c++          : not found
    
    您还没有安装编译所需的基本工具。在Debian和Ubuntu上,这应该可以修复它:

    sudo apt-get install build-essential
    

    对于其他分布,命令有点不同,但基本原理是相同的。

    我想知道,没有C++编译器,你是如何构建节点的?