我'"尝试解锁...但尚未锁定"用nvm安装节点后

时间:2015-02-05 12:42:10

标签: node.js npm sails.js

尝试使用npm时遇到此错误... 所以我试过这个: https://stackoverflow.com/a/24404451/3915033

1: 没办法用apt-get卸载它,我不得不自己做多个

sudo rm -R

(无法卸载npm)

2:

  • 在我拥有的文件夹中安装了nvm
  • 与我和需要使用节点
  • 的其他用户分组
  • 权限是rwxrwsr-x无处不在

我认为应该允许一切对我和节点的其他用户

起作用

3: 确实

nvm install 0.10

4: 无法使用npm!

尝试:

npm -g install sails

给出了:

0 info it worked if it ends with ok
1 verbose cli [ '/edon/v0.10.36/bin/node',
1 verbose cli   '/edon/v0.10.36/bin/npm',
1 verbose cli   '-g',
1 verbose cli   'install',
1 verbose cli   'sails' ]
2 info using npm@1.4.28
3 info using node@v0.10.36
4 verbose cache add [ 'sails', null ]
5 verbose cache add name=undefined spec="sails" args=["sails",null]
6 verbose parsed url { protocol: null,
6 verbose parsed url   slashes: null,
6 verbose parsed url   auth: null,
6 verbose parsed url   host: null,
6 verbose parsed url   port: null,
6 verbose parsed url   hostname: null,
6 verbose parsed url   hash: null,
6 verbose parsed url   search: null,
6 verbose parsed url   query: null,
6 verbose parsed url   pathname: 'sails',
6 verbose parsed url   path: 'sails',
6 verbose parsed url   href: 'sails' }
7 silly lockFile e20e6cdc-sails sails
8 error Error: Attempt to unlock sails, which hasn't been locked
8 error     at unlock (/edon/v0.10.36/lib/node_modules/npm/lib/utils/locker.js:44:11)
8 error     at cb (/edon/v0.10.36/lib/node_modules/npm/lib/cache/add-local.js:30:5)
8 error     at /edon/v0.10.36/lib/node_modules/npm/lib/cache/add-local.js:47:20
8 error     at /edon/v0.10.36/lib/node_modules/npm/lib/utils/locker.js:22:20
8 error     at /edon/v0.10.36/lib/node_modules/npm/node_modules/inflight/inflight.js:22:7
8 error     at Array.forEach (native)
8 error     at res (/edon/v0.10.36/lib/node_modules/npm/node_modules/inflight/inflight.js:21:9)
8 error     at f (/edon/v0.10.36/lib/node_modules/npm/node_modules/once/once.js:16:25)
8 error     at afterMkdir (/edon/v0.10.36/lib/node_modules/npm/lib/cache/get-stat.js:53:14)
8 error     at /edon/v0.10.36/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
9 error If you need help, you may report this *entire* log,
9 error including the npm and node versions, at:
9 error     <http://github.com/npm/npm/issues>
10 error System Linux 2.6.32-042stab102.9
11 error command "/edon/v0.10.36/bin/node" "/edon/v0.10.36/bin/npm" "-g" "install" "sails"
12 error cwd /edon
13 error node -v v0.10.36
14 error npm -v 1.4.28
15 verbose exit [ 1, true ]

我怀疑我的删除节点和npm可能不完整......

我尝试过使用nvm,npm等作为root并没有问题(在我做完这一切之前它有问题) 我认为我们必须以root身份在节点上工作,但我更愿意在没有它的情况下工作

(对不起,如果我的英语不好)

0 个答案:

没有答案