thecodingmachine / nodejs-installer

An installer package that let's you install NodeJS and NPM as a Composer dependency.
107 stars 28 forks source link

nodejs-installer fails on arm (Raspberry pi) #17

Closed kaufmo closed 9 years ago

kaufmo commented 9 years ago

nodejs-installer doesn't work on by raspberry pi

$ uname -a
Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux

it tires to download x86 binaries:

Installing NodeJS v0.12.7
  Downloading from http://nodejs.org/dist/v0.12.7/node-v0.12.7-linux-x86.tar.gz
    Downloading: 100%         

but those obviously won't work:

$ ./vendor/nodejs/nodejs/bin/node 
-bash: ./node: Kann die Datei nicht ausführen.
moufmouf commented 9 years ago

Hi Alexander,

It seems that the NodeJS website does not provide us with binaries for ARM processors, so NodeJS installer will be unable to installe Node on a Raspberry Pi.

However, you are right that we shouldn't download the x86 binary. We should instead display an error message.

I don't have a Raspeberry Pi for testing.

Would you mind running this command in PHP on the Raspberry and telling me what the output is?

<?php
echo php_uname('m')."\n";

This will help me detect Arm cpus and provide an appropriate error message.

Thanks!

kaufmo commented 9 years ago

Hi David,

thx for the quick answer :+1: I'm gettting these output:

$ php -r 'print php_uname("m")."\n";'
armv7l
moufmouf commented 9 years ago

Hi Alexander,

It should be kind of "fixed" now. You should have a clear error message explaining that on ARM processors, you need to install NodeJS globally manually.

Could you let me know if this works (since I can't test it!) (it's not yet tagged so you'll need to add "minimum-stability":"dev" to your composer.json.

moufmouf commented 9 years ago

Hey,

Node just added new releases for ARM processors starting with Node 4.0. I just introduced this in NodeJS-installer, so now, you should be able to use NodeJS-installer directly even on a Raspberry. I don't have a Raspberry to test this though.

I'm closing this issue, and you are welcome to open a new one if you have any issues with install on Raspberry.