2 shijianduan1 shijianduan1 于 2016.03.02 20:14 提问

ubuntu下安装 hexo失败

执行 sudo npm install hexo -g时 报错

贴上报错

 npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian


> dtrace-provider@0.6.0 install /usr/local/lib/node_modules/hexo/node_modules/hexo-log/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js

sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm WARN optional dep failed, continuing dtrace-provider@0.6.0
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/cssstyle/lib/properties'
npm ERR! error rolling back  hexo@3.2.0 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/cssstyle/lib/properties']
npm ERR! error rolling back   errno: 53,
npm ERR! error rolling back   code: 'ENOTEMPTY',
npm ERR! error rolling back   path: '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/cssstyle/lib/properties' }
npm ERR! spawn-sync@1.0.15 postinstall: `node postinstall`
npm ERR! Exit status 127
npm ERR! 
npm ERR! Failed at the spawn-sync@1.0.15 postinstall script.
npm ERR! This is most likely a problem with the spawn-sync package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node postinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/hawk/lib/server.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/hawk/lib/server.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! EEXIST, mkdir '/usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol'
File exists: /usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol
Move it away, and try again. 

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol
npm ERR! fstream_path /usr/local/lib/node_modules/hexo/node_modules/warehouse/node_modules/cuid/node_modules/core-js/library/fn/symbol/iterator.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/lib/nodejs/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE
npm ERR! fstream_path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/LICENSE
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.19.0-51-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "hexo" "-g"
npm ERR! cwd /home/sjd/code
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
npm ERR! fstream_path /usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/lib/nodejs/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/hexo/node_modules/cheerio/node_modules/jsdom/node_modules/request/node_modules/bl/node_modules/readable-stream/doc/stream.markdown'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

1个回答

caozhy
caozhy   Ds   Rxr 2016.03.07 05:38
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!