在 mac osx10.10.4 node.js 0.12.7环境下装 hexo 出现如下错误,求解


bogon:~ wangbin$ npm install hexo -g
npm WARN locking Error: EACCES, open '/Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock.STALE'
npm WARN locking at Error (native)
npm WARN locking /Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock failed { [Error: EACCES, open '/Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock.STALE']
npm WARN locking errno: -13,
npm WARN locking code: 'EACCES',
npm WARN locking path: '/Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock.STALE' }
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "hexo" "-g"
npm ERR! node v0.12.7
npm ERR! npm v2.13.0

npm ERR! Attempt to unlock /usr/local/lib/node_modules/hexo, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /Users/wangbin/npm-debug.log
bogon:~ wangbin$ npm install hexo -g
npm WARN locking Error: EACCES, open '/Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock.STALE'
npm WARN locking at Error (native)
npm WARN locking /Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock failed { [Error: EACCES, open '/Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock.STALE']
npm WARN locking errno: -13,
npm WARN locking code: 'EACCES',
npm WARN locking path: '/Users/wangbin/.npm/_locks/hexo-eabe9ea76eaf84ee.lock.STALE' }
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "hexo" "-g"
npm ERR! node v0.12.7
npm ERR! npm v2.13.0

npm ERR! Attempt to unlock /usr/local/lib/node_modules/hexo, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /Users/wangbin/npm-debug.log

node.js hexo

梦14535 9 years, 6 months ago

sudo npm install hexo -g

现实的杯子 answered 9 years, 6 months ago


 hexo


 npm install hexo-cli -g
hexo init blog
cd blog
npm install
hexo server

挪你命3000 answered 9 years, 6 months ago

Your Answer