安装时我得到这个错误......如何安装?任何人都可以帮助我吗?
localhost:~ rammanikannta$ git clone git://github.com/germallon/phonegapbuildapi.git
Cloning into 'phonegapbuildapi'...
remote: Counting objects: 190, done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 190 (delta 106), reused 180 (delta 97)
Receiving objects: 100% (190/190), 59.61 KiB | 0 bytes/s, done.
Resolving deltas: 100% (106/106), done.
Checking connectivity... done
localhost:~ rammanikannta$ cd phonegapbuildapi
localhost:phonegapbuildapi rammanikannta$ npm link
npm ERR! Error: EACCES, symlink '/Users/rammanikannta/phonegapbuildapi'
npm ERR! { [Error: EACCES, symlink '/Users/rammanikannta/phonegapbuildapi']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/Users/rammanikannta/phonegapbuildapi' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "link"
npm ERR! cwd /Users/rammanikannta/phonegapbuildapi
npm ERR! node -v v0.10.20
npm ERR! npm -v 1.3.11
npm ERR! path /Users/rammanikannta/phonegapbuildapi
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, symlink '/Users/rammanikannta/phonegapbuildapi'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/rammanikannta/phonegapbuildapi/npm-debug.log
npm ERR! not ok code 0
答案 0 :(得分:0)
看到:Please try running this command again as root/Administrator.
试试sudo npm link
答案 1 :(得分:0)
以root身份运行npm link
命令:
$ sudo npm link
(假设用户rammanikannta
是管理员)。
当要求输入密码时,请输入您自己的密码。
原因是npm link
尝试从全局node_modules
目录创建符号链接到您下载的phonegapbuildapi
,并且您可能没有正确的权限来创建符号链接。