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

Detect arm64 architecture #494

Closed
wants to merge 1 commit into from
Closed

Detect arm64 architecture #494

wants to merge 1 commit into from

Conversation

jessaustin
Copy link

Describe what you did

Added arm64 architecture compatibility.

How you did it

Added an entry for the "arm64" architecture to the architecture uname case statement in tarball_url(). Actually, the string to look for in the uname output is aarch64, but on the nodejs site that architecture is called "arm64".

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

$ uname -a

On any machine on which the output of uname does not contain the string "aarch64", this PR will have no effect.

If this solves an issue, please put issue in PR notes.

I never filed an issue for this.

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

If your machine is on this architecture (e.g. a Samsung Chromebook Plus), it previously would have worked like this:

$ sudo n latest

     install : node-v9.9.0
       mkdir : /usr/local/n/versions/node/9.9.0
       fetch : https://nodejs.org/dist/v9.9.0/node-v9.9.0-linux-x86.tar.gz
######################################################################## 100.0%
/usr/local/bin/n: line 582: /usr/local/bin/node: cannot execute binary file: Exec format error
   installed : 
$ node --version
-su: /usr/local/bin/node: cannot execute binary file: Exec format error

After this change, it's more like this:

$ sudo n latest

     install : node-v9.9.0
       mkdir : /usr/local/n/versions/node/9.9.0
       fetch : https://nodejs.org/dist/v9.9.0/node-v9.9.0-linux-arm64.tar.gz
######################################################################## 100.0%
   installed : v9.9.0

$ node --version
v9.9.0

Squash any unnecessary commits to keep history clean as possible

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

"add detection for arm64/aarch64 architecture"

@krzysdz krzysdz mentioned this pull request May 31, 2018
@tlvince
Copy link

tlvince commented Jun 6, 2018

@troy0820 / other contributors; could this be merged? @krzysdz submitted the same PR and I was about to do the same until I found this. Thanks 👍

@krzysdz
Copy link

krzysdz commented Jun 6, 2018

I've just noticed that there is another pull request adding support for arm64 - #448 published on 11 Jul 2017 so almost 11 months ago...

@jessaustin
Copy link
Author

Haha yes #448 is better. It's 13 commits behind, but it works for both arm64 and aarch64. Install with either:

$ git clone https://github.com/joeledwards/n
$ cd n
$ make install

or

$ npm i -g https://github.com/joeledwards/n 

@jessaustin jessaustin closed this Jun 6, 2018
@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.

3 participants