1

Platform: Raspberry Pi 3

SO: Raspbian

I would like to try nodejs in my raspberry. I tried to install npm packages via terminal and I got the next errors.

Command

sudo npm install -g n

Errors

./npm: bad interpreter: /usr/bin/nodejs: no such file or directory

Install nodejs

sudo apt-get install nodejs

Terminal output

Reading package lists... Done
Building dependency tree
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

Install npm

sudo apt-get install npm

Terminal output

Reading package lists... Done
Building dependency tree
Reading state information... Done
npm is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

What can I do to solve this?

  • 1
    Do you already download package nodejs? It obvious that you must download and install nodejs before using npm – xdhe Jun 11 '16 at 14:34
  • Maybe this link could help goo.gl/01FUSO – xdhe Jun 13 '16 at 2:37
2

As xdhe points out you need two packages (I am surprised npm did not include node as a dependency, but anyway...)

sudo apt install nodejs
sudo apt install npm
  • I have update the information about the error. I have already installed npm and node. – Ismael Moral Jun 12 '16 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.