步骤
- # Using Ubuntu
- curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
- sudo apt-get install -y nodejs
- curl -L https://www.npmjs.com/install.sh | sh
- # 解决方案
- npm config set user 0
- npm config set unsafe-perm true
参考
1. node.js: https://github.com/nodesource/distributions
2. nmp: https://github.com/npm/npm
3. 权限错误: https://www.cnblogs.com/lidonghao/p/3543747.html
4. hexo 环境搭建: http://www.voidking.com/2015/05/30/deve-hexo-build-environment/