我一直在尝试按照Mike Bostock的Let’s Make a Map教程
http://bost.ocks.org/mike/map/安装topojson,我相信我已经设法获得最新版本的Node.js和npm. $ogr2ogr也适用.我对编程和Ubuntu很陌生,并且真诚地感谢npm install topojson -g为什么会出现以下错误.当我用sudo尝试相同的命令时会产生如下错误:npm ERR!注册表错误解析json和gyp ERR! stack错误:无法安装节点的“pre”版本,请改用–nodedir标志
谢谢!
npm ERR! Error: EACCES,open '/home/natecraft/.npm/7edf76d6-topojson.lock' npm ERR! { [Error: EACCES,open '/home/natecraft/.npm/7edf76d6-topojson.lock'] npm ERR! errno: 3,npm ERR! code: 'EACCES',npm ERR! path: '/home/natecraft/.npm/7edf76d6-topojson.lock' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Linux 3.5.0-23-generic npm ERR! command "/home/natecraft/.nvm/v0.10.15/bin/node" "/home/natecraft/.nvm/v0.10.15/bin/npm" "install" "topojson" "-g" npm ERR! cwd /home/natecraft/Downloads/node-latest-install npm ERR! node -v v0.10.15 npm ERR! npm -v 1.3.5 npm ERR! path /home/natecraft/.npm/7edf76d6-topojson.lock npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES,open '/home/natecraft/.npm/7edf76d6-topojson.lock' npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/natecraft/Downloads/node-latest-install/npm-debug.log npm ERR! not ok code 0