Cannot install NodeJs: /usr/bin/env: node: No such file or directory

后端 未结 18 1323
野趣味
野趣味 2020-11-28 00:01

I\'m trying to install nodeJs into my Ubuntu 14.04 in order to use GruntJs.

I\'ve read about Ubuntu different way of doing it (issues?), so this is what I\'ve done i

18条回答
  •  無奈伤痛
    2020-11-28 00:45

    Follow these commands to fix the problem.

    In a terminal:

    1. Clean the entire NPM cache:

      $ sudo npm cache clean -f
      
    2. sudo npm install -g n
      
    3. Install the latest stable version of Node.js:

      sudo n stable
      

    Now the latest version of Node.js was installed. Check the version using:

    node -v
    

提交回复
热议问题