在ubuntu上装了node.js后,npm install hexo-cli -g 提示没装npm,怎么办
在ubuntu上装了node.js后,npm install hexo-cli -g 提示没装npm,怎么办
如果使用apt-get install nodejs npm 需要单独装
官方有安装介绍
NOTE: If you are using Ubuntu Precise or Debian Wheezy, you might want to read about running Node.js >= 4.x on older distros.
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - sudo apt-get install -y nodejs
Alternatively, for Node.js v6:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install -y nodejs
3 回答2.6k 阅读✓ 已解决
1 回答962 阅读✓ 已解决
2 回答1.2k 阅读
1 回答1.1k 阅读✓ 已解决
2 回答639 阅读✓ 已解决
2 回答1.7k 阅读
2 回答1.1k 阅读
是不是nodejs 装残了?
你可以通过
npm config get prefix
查看全局安装路径,
通过
npm config set prefix=路径