Grandika
Grandika

Reputation: 98

Node.js installation on raspberry PI 3 issue

I'm following quite simple steps of upgrading Node.js on Raspberry:

curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

it produces like veerything is correct: ...

Selecting previously unselected package nodejs.
(Reading database ... 56727 files and directories currently installed.)
Preparing to unpack .../nodejs_9.11.1-1nodesource1_armhf.deb ...
Unpacking nodejs (9.11.1-1nodesource1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up nodejs (9.11.1-1nodesource1) ...

However, after when i try to launch

node -v

it gives error

-bash: /usr/sbin/node: No such file or directory

and there is really no node directory in the /usr/sbin/! What's happening?

UPDATE:

After reboot the same command gives another error:

-bash: /usr/bin/node: cannot execute binary file: Exec format error

processor is Arm7

Upvotes: 0

Views: 559

Answers (1)

Ridham Tarpara
Ridham Tarpara

Reputation: 6160

I had the similar issue but installing via nvm solved the issue. I am still not sure why this error is occurring.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.10/install.sh | bash

nvm install node

node -v

Upvotes: 1

Related Questions