search

Home  >  Q&A  >  body text

在ubuntu上装了node.js后,npm install hexo-cli -g 提示没装npm,怎么办

在ubuntu上装了node.js后,npm install hexo-cli -g 提示没装npm,怎么办

高洛峰高洛峰2786 days ago560

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 13:10:06

    Is nodejs pretending to be disabled?

    You can view the global installation path via
    npm config get prefix
    ,
    via
    npm config set prefix=path

    reply
    0
  • 阿神

    阿神2017-04-17 13:10:06

    If you use apt-get install nodejs npm, you need to install it separately
    Official installation instructions

    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
    

    reply
    0
  • Cancelreply