Raspberry Pi installs node. js

Source: Internet
Author: User


Because the Raspberry Pi is an arm architecture, there is no binary package download for ARM architecture on node. js. Tried using apt package to manage installation and direct node. JS source code compilation installation (compiled for four or five hours ...) ), failed to report an illegal instruction error, or due to a compiled processor architecture error. However, some of Google's small partners have succeeded, I do not know why, it may be the version of the issue of the compilation.

Here is a relatively simple method, the pro-test is effective. In fact, it is in the history list of the official website found the old version of v0.10.28 ARM Architecture binary Package, the official website history list http://nodejs.org/dist.

The deployment method is as follows:

wget HTTP://NODEJS.ORG/DIST/V0.10.28/NODE-V0.10.28-LINUX-ARM-PI.TAR.GZTAR-XZF node-v0.10.28-linux-arm-pi.tar.gz

After extracting it, you can see the NODE-V0.10.28-LINUX-ARM-PI directory, which contains the bin directory with node and NPM. For ease of use, configure the bin directory path inside the PATH environment variable.

Edit the ~/.BASHRC file, add the node environment variable to the file, and add it to path:

Export Node= your node-v0.10.28-linux-arm-pi's path to export path= $PATH: $NODE/bin


After saving, execute the source ~/.BASHRC command. This allows you to use the node and NPM commands directly, and you can try the node-v or NPM-V command to print the current version number and print it correctly.

Raspberry Pi installs node. js

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.