Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node js arm 7 cross compile #629

Closed
rebecca-eujin opened this issue May 19, 2017 · 7 comments
Closed

node js arm 7 cross compile #629

rebecca-eujin opened this issue May 19, 2017 · 7 comments

Comments

@rebecca-eujin
Copy link

  • Node.js Version: node-v0.12.0-linux-arm-pi
  • OS:windows 7
  • Scope (install, code, runtime, meta, other?): install(?)/use
  • Module (and version) (if relevant): arm7

Im having issues using files that have been provided by Node js for arm7 (android).
Currently, Im trying to run node js files in arm7.
However, Im not sure how should I use the files that have been provided.
I have tried putting files in /system/bin and command node by running node file in node-v0.12.0-linux-arm-pi/bin.
However, it provides error by the node file does not exist.
How should I solve this problem?

@gibfahn
Copy link
Member

gibfahn commented May 19, 2017

OS:windows 7

I assume you're running Raspbian not Windows 7 right?

Which file did you put in /system/bin?

Assuming you're using the terminal, you can navigate to node-v0.12.0-linux-arm-pi/bin and do:

ls                # Should show node npm
./node            # Runs node

@rebecca-eujin
Copy link
Author

rebecca-eujin commented May 22, 2017

yes I did the same way however it provides error by file does not exist

@gibfahn
Copy link
Member

gibfahn commented May 22, 2017

What is the output of the ls command?

@rebecca-eujin
Copy link
Author

node npm

@gibfahn
Copy link
Member

gibfahn commented May 23, 2017

What about ls -l?

@mscdex mscdex mentioned this issue May 26, 2017
@gibfahn
Copy link
Member

gibfahn commented May 26, 2017

Short answer:

To install manually do:

wget https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-armv7l.tar.gz
tar -xf node-v6.10.3-linux-armv7l.tar.gz --directory /usr/local --strip-components 1

This will put the ./bin directory in /usr/local/bin, which should be in your $PATH already. You can verify that it worked with:

which node
which npm
node --version
npm --version

Alternatives:

If you want to use a package manager, see this guide. For older Linux distros you might need to see these instructions.

If you want to install node manually, there is no "installation" on Linux per se, you just need to extract the tarball, and make sure the node and npm binaries in the ./bin subdirectory are somewhere in your path.

I find nvm is useful for managing node installations (it will download, extract, and add to path for you). If you want to do things manually, you can do something like:

@gireeshpunathil
Copy link
Member

closing as answered, please re-open if this is still outstanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants