Question

I tried many ways now to install the current 0.10.26 version of node.js.

the machine is a Arm Cortex A9 with Xubuntu 12.04 installed on:

lsb_release -a

gives me:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:        12.04
Codename:       precise

uname -a

gives me:

Linux utilite-ubuntu-desktop 3.0.35-cm-fx6-4 #123 SMP Thu Sep 12 10:41:30 IST 2013 armv7l armv7l armv7l GNU/Linux

when I install node.js the easy way doing:

sudo apt-get install git-core curl build-essential openssl libssl-dev
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs 

I end up with node.js version

v0.6.12

during the installation of node.js I get the following output:

The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.
Need to get 0 B/629 kB of archives.
After this operation, 2186 kB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 164415 files and directories currently installed.)
Unpacking nodejs (from .../nodejs_0.6.12~dfsg1-1ubuntu1_armel.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Processing triggers for man-db ...
Setting up nodejs (0.6.12~dfsg1-1ubuntu1) ...
update-alternatives: using /usr/bin/node to provide /usr/bin/js (js) in auto mode.

Does this mean: "Selecting previously unselected package nodejs" he will install former installed versions again? Or why is he not selecting the most recent verison?

Anyway then I completely uninstalled it using nearly this instruction: How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

I found instructions that did something like this (the following wold be my case):

sudo apt-get install nodejs=0.10.26-1chl1~precise1

but it gave me only:

E: Version '0.10.26-1chl1~precise1' for 'nodejs' was not found

So I downloaded and installed nvm version v0.5.1 and when I do

nvm install v0.10.26

I get:

######################################################################## 100.0%
Checksums empty

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Binary download failed, trying source.
Additional options while compiling:

######################################################################## 100.0%
{ 'target_defaults': { 'cflags': [],
                       'default_configuration': 'Release',
                       'defines': [],
                       'include_dirs': [],
                       'libraries': []},
  'variables': { 'arm_fpu': 'vfpv3',
                 'arm_neon': 0,
                 'armv7': 1,
                 'clang': 0,
                 'gcc_version': 46,
                 'host_arch': 'arm',
                 'node_install_npm': 'true',
                 'node_prefix': '/home/utilite/.nvm/v0.10.26',
                 'node_shared_cares': 'false',
                 'node_shared_http_parser': 'false',
                 'node_shared_libuv': 'false',
                 'node_shared_openssl': 'false',
                 'node_shared_v8': 'false',
                 'node_shared_zlib': 'false',
                 'node_tag': '',
                 'node_unsafe_optimizations': 0,
                 'node_use_dtrace': 'false',
                 'node_use_etw': 'false',
                 'node_use_openssl': 'true',
                 'node_use_perfctr': 'false',
                 'node_use_systemtap': 'false',
                 'python': '/usr/bin/python',
                 'target_arch': 'arm',
                 'v8_enable_gdbjit': 0,
                 'v8_no_strict_aliasing': 1,
                 'v8_use_arm_eabi_hardfloat': 'false',
                 'v8_use_snapshot': 'true'}}
creating  ./config.gypi
creating  ./config.mk
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/utilite/.nvm/src/node-v0.10.26/out'
make[1]: Warning: File `/home/utilite/.nvm/src/node-v0.10.26/out/Release/.deps//home/utilite/.nvm/src/node-v0.10.26/out/Release/libv8_nosnapshot.a.d' has modification time 4.4e+04 s in the future
  LD_LIBRARY_PATH=/home/utilite/.nvm/src/node-v0.10.26/out/Release/lib.host:/home/utilite/.nvm/src/node-v0.10.26/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/tools/gyp; mkdir -p /home/utilite/.nvm/src/node-v0.10.26/out/Release/obj.target/v8_snapshot/geni; "/home/utilite/.nvm/src/node-v0.10.26/out/Release/mksnapshot" --log-snapshot-positions --logfile "/home/utilite/.nvm/src/node-v0.10.26/out/Release/obj.target/v8_snapshot/geni/snapshot.log" "/home/utilite/.nvm/src/node-v0.10.26/out/Release/obj.target/v8_snapshot/geni/snapshot.cc"
^Cmake[1]: *** [/home/utilite/.nvm/src/node-v0.10.26/out/Release/obj.target/v8_snapshot/geni/snapshot.cc]

There it runs in a loop until I hit Cntrl C. Unfortuantely the same happens when trying to do it with the git:

git clone https://github.com/joyent/node.git

it compiles and then hangs in an infinite loop (tried it several hours allready). The process hanging is mksnapshot. I found the following issue on V8 regarding a similar behaviour: http://code.google.com/p/v8/issues/detail?id=884 They talk about gcc 4.5.x where my is 4.6.3.

So at this point I do not know any futher and would highly appreachiate any kind of help. it looks like something is wrong with my linux here but I do not know where to start.

many thanks,

Benjamin

Was it helpful?

Solution

As you specify in your posts, you are running the Utilite Standard which runs over ARM processor. I've been able to make Node.js work but you will need to compile the source code with a custom configuration for ARM processor.

In addition, I should point that 0.10.26 version is not working so just try with 0.11.9 which will compile Node and NPM.

Here is how I managed to install it step by step, sorry because it's in Spanish but you can copy-paste commands.

http://www.ibaivalencia.com/instalar-y-ejecutar-node-js-en-una-maquina-arm-con-linux/

OTHER TIPS

The binaries in the PPA are for x86/x86_64, not ARM. You will have to install from source (or try the pre-compiled Raspberry Pi binary if you want).

If you're cloning from git, you're checking out the master branch by default which is unstable. Here's a one-liner that installs the latest stable version that you might try instead:

rm -rf /tmp/node-install && mkdir /tmp/node-install && pushd . && cd /tmp/node-install && curl -L http://nodejs.org/dist/node-latest.tar.gz | tar zx && cd `ls | grep node` && ./configure && make && make install && popd && rm -rf /tmp/node-install

try ./configure --without-snapshot --dest-cpu=arm --dest-os=linux

I encountered this kind of problem (infinite loop during mksnapshot) during the make compilation of "shiny-server" which requires node.js ; on a ARM processor (ODROID). Actually, the version of node.js in the makefile was 0.10.40. Going back to 0.10.21 fixed the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top