安装topojson(sudo npm install -g topojson
)时出现以下错误:
/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-24-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gypnpm ERR!http GET https://registry.npmjs.org/assert-plus/0.1.2
cwd /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/contextify
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
npm gyp ERR!http not ok
GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/ctype/0.5.2
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 ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties'
npm ERR! error rolling back jsdom@0.5.7 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules/d3/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/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties' }
npm ERR! Error: ENOENT, open '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitUserSelect.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "topojson"
npm ERR! cwd /home/peter
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/cssstyle/lib/properties/webkitUserSelect.js
npm ERR! code ENOENT
npm ERR! errno 34
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/async
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/hawk/images/logo.png'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "topojson"
npm ERR! cwd /home/peter
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/hawk/images/logo.png
npm ERR! fstream_path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/hawk/images/logo.png
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 (fs.js:107:15)
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/tough-cookie/lib/cookie.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>
npm ERR! System Linux 3.13.0-24-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "topojson"
npm ERR! cwd /home/peter
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/tough-cookie/lib/cookie.js
npm ERR! fstream_path /usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules/request/node_modules/tough-cookie/lib/cookie.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 (fs.js:107:15)
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules'
npm ERR! error rolling back topojson@1.6.14 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/topojson/node_modules']
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/topojson/node_modules' }
npm ERR! weird error 1
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/peter/npm-debug.log
npm ERR! not ok code 0
我正在安装所有更新的Ubuntu 14.04上运行。我的工具版本是:
我查看了第一个提到的路径(/usr/local/lib/node_modules/topojson/node_modules/d3/node_modules/jsdom/node_modules
),但只找到request
和不 contextify
。这表明topojson的依赖关系有问题吗?
应该在/home/peter/npm-debug.log
找到的附加日志不存在。