在安装forever时出现如下错。请问下该怎么办?
发布于 12 年前 作者 df82325542 4535 次浏览 最后一次编辑是 8 年前

/usr/tools/forever-master/bin# npm install forever -g npm ERR! Not a package /tmp/npm-1351941279013/1351941279013-0.7231685270089656/tmp.tgz npm ERR! couldn’t unpack /tmp/npm-1351941279013/1351941279013-0.7231685270089656/tmp.tgz to /tmp/npm-1351941279013/1351941279013-0.7231685270089656 npm http GET https://registry.npmjs.org/forever npm http 304 https://registry.npmjs.org/forever npm http GET https://registry.npmjs.org/cliff npm http GET https://registry.npmjs.org/daemon npm http GET https://registry.npmjs.org/microtime npm http GET https://registry.npmjs.org/broadway npm http GET https://registry.npmjs.org/flatiron npm http GET https://registry.npmjs.org/optimist npm http GET https://registry.npmjs.org/pkginfo npm http GET https://registry.npmjs.org/nssocket npm http GET https://registry.npmjs.org/portfinder npm http GET https://registry.npmjs.org/ps-tree npm http GET https://registry.npmjs.org/node-fork npm http GET https://registry.npmjs.org/timespan npm http GET https://registry.npmjs.org/watch npm http GET https://registry.npmjs.org/utile npm http GET https://registry.npmjs.org/minimatch npm http GET https://registry.npmjs.org/nconf npm http GET https://registry.npmjs.org/winston npm http 304 https://registry.npmjs.org/daemon npm http 304 https://registry.npmjs.org/cliff npm http 304 https://registry.npmjs.org/flatiron npm http 304 https://registry.npmjs.org/broadway npm http 304 https://registry.npmjs.org/microtime npm http 304 https://registry.npmjs.org/optimist npm http 304 https://registry.npmjs.org/pkginfo npm http 304 https://registry.npmjs.org/nssocket npm http 304 https://registry.npmjs.org/ps-tree npm http 304 https://registry.npmjs.org/portfinder npm http 304 https://registry.npmjs.org/node-fork npm http 304 https://registry.npmjs.org/timespan npm http 304 https://registry.npmjs.org/watch npm http 304 https://registry.npmjs.org/utile npm http 304 https://registry.npmjs.org/minimatch npm http 304 https://registry.npmjs.org/nconf npm http 304 https://registry.npmjs.org/winston npm http GET https://registry.npmjs.org/parse-table

microtime@0.2.0 install /usr/local/lib/node_modules/forever/node_modules/microtime node-waf configure build

npm http GET https://registry.npmjs.org/mkdirp Checking for program g++ or c++ : not found Checking for program icpc : not found Checking for program c++ : not found /usr/local/lib/node_modules/forever/node_modules/microtime/wscript:9: error: could not configure a cxx compiler! npm ERR! error installing microtime@0.2.0

daemon@0.5.1 preinstall /usr/local/lib/node_modules/forever/node_modules/daemon bash ./install

npm ERR! error installing forever@0.9.2

npm ERR! Error: ENOENT, no such file or directory '/usr/local/lib/node_modules/forever/node_modules/___nssocket.npm/package/test/tcp-test.js’ npm ERR! You may report this log at: npm ERR! http://bugs.debian.org/npm npm ERR! or use npm ERR! reportbug --attach /usr/tools/forever-master/bin/npm-debug.log npm npm ERR! npm ERR! System Linux 3.2.0-29-generic npm ERR! command “node” “/usr/bin/npm” “install” “forever” "-g" npm ERR! cwd /usr/tools/forever-master/bin npm ERR! node -v v0.6.12 npm ERR! npm -v 1.1.4 npm ERR! path /usr/local/lib/node_modules/forever/node_modules/___nssocket.npm/package/test/tcp-test.js npm ERR! fstream_path /usr/local/lib/node_modules/forever/node_modules/___nssocket.npm/package/test/tcp-test.js npm ERR! fstream_type File npm ERR! fstream_class FileWriter npm ERR! fstream_finish_call chmod npm ERR! code ENOENT npm ERR! message ENOENT, no such file or directory '/usr/local/lib/node_modules/forever/node_modules/___nssocket.npm/package/test/tcp-test.js’ npm ERR! errno {} npm ERR! fstream_stack Object.oncomplete (/usr/lib/nodejs/fstream/lib/writer.js:285:17) arg[0] directory does not contain a wscript file npm http GET https://registry.npmjs.org/sigmund npm http GET https://registry.npmjs.org/lru-cache

npm ERR! Error: ENOENT, no such file or directory '/usr/local/lib/node_modules/forever/node_modules/___broadway.npm/package/examples/browser/plugins/helloworld.js’ npm ERR! You may report this log at: npm ERR! http://bugs.debian.org/npm npm ERR! or use npm ERR! reportbug --attach /usr/tools/forever-master/bin/npm-debug.log npm npm ERR! npm ERR! System Linux 3.2.0-29-generic npm ERR! command “node” “/usr/bin/npm” “install” “forever” "-g" npm ERR! cwd /usr/tools/forever-master/bin npm ERR! node -v v0.6.12 npm ERR! npm -v 1.1.4 npm ERR! path /usr/local/lib/node_modules/forever/node_modules/___broadway.npm/package/examples/browser/plugins/helloworld.js npm ERR! code ENOENT npm ERR! message ENOENT, no such file or directory '/usr/local/lib/node_modules/forever/node_modules/___broadway.npm/package/examples/browser/plugins/helloworld.js’ npm ERR! errno {} npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /usr/tools/forever-master/bin/npm-debug.log npm not ok

3 回复

下次记得贴报错时候把报错标记成代码… 现在这样很难看的… 另外估计是没装 g++sudo apt-get install build-essential

谢谢、。可以了。。。。不是很熟这个

第一反应是权限,是拿root用户装的么。。然后看了下报错。。

Checking for program g++ or c++ : not found 这个都没有。。还是先装下吧- -。

回到顶部