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

Add support for arm64 #507

Closed
wants to merge 1 commit into from
Closed

Add support for arm64 #507

wants to merge 1 commit into from

Conversation

krzysdz
Copy link

@krzysdz krzysdz commented May 31, 2018

Describe what you did

Added proper version of node.js for arm64 arch

How you did it

Set arch to arm64 (used in URL's in Node.js downloads) if uname returns aarch64 as architecture

How to verify it doesn't affect the functionality of n

Install Node.js on a system with other architecture and check whether it still works (it should)

If this solves an issue, please include the output of issue that had problems and then the fixed output from the same command.

Problem 1

Before - versions 10.0.0 (and higher):

krzys@localhost:~/node-v8.11.2-linux-arm64$ sudo env "PATH=$PATH" n 10.0.0

install : node-v10.0.0

Error: invalid version 10.0.0

After:

krzys@localhost:~/node-v8.11.2-linux-arm64$ sudo env "PATH=$PATH" n 10.0.0

install : node-v10.0.0
  mkdir : /usr/local/n/versions/node/10.0.0
  fetch : https://nodejs.org/dist/v10.0.0/node-v10.0.0-linux-arm64.tar.gz

installed : v10.0.0

Problem 2

Before - errors during installation (due to incorrect architectute):

krzys@localhost:~/node-v8.11.2-linux-arm64$ sudo env "PATH=$PATH" n lts

install : node-v8.11.2
  mkdir : /usr/local/n/versions/node/8.11.2
  fetch : https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-x86.tar.gz

/home/krzys/node-v8.11.2-linux-arm64/bin/n: linia 583: /usr/local/bin/node: nie można uruchomić pliku binarnego: Błędny format pliku wykonywalnego
installed :

The error message says that the executable cannot be executed due to incorrect executable format

After:

krzys@localhost:~/node-v8.11.2-linux-arm64$ sudo env "PATH=$PATH" n lts

   install : node-v8.11.2
   mkdir : /usr/local/n/versions/node/8.11.2
     fetch : https://nodejs.org/dist/v8.11.2/node-v8.11.2-linux-arm64.tar.gz

installed : v8.11.2

Place description for the changelog in PR so we can tally all changes for any future release

Fix Node.js installation/upgrade for systems using arm64 architecture

arm64 (aarch64/armv8) was not recognized, and x86 version of Node.js was installed on some ARM platforms.
@krzysdz krzysdz closed this May 31, 2018
@krzysdz
Copy link
Author

krzysdz commented May 31, 2018

Duplicate of #494

@krzysdz krzysdz deleted the patch-1 branch June 6, 2018 20:06
@tlvince tlvince mentioned this pull request Jun 8, 2018
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

Successfully merging this pull request may close these issues.

1 participant