Getting latest node.js to run on UDOO

Discussion in 'General Programming Discussion' started by jfey, Nov 26, 2013.

  1. jfey

    jfey New Member

    Joined:
    Nov 25, 2013
    Messages:
    5
    Likes Received:
    0
    Since someone here in our team asked me how i did it i'll answer right here in the forum in case this is of interest for more node fans:

    The best way (at least for me) to get the latest version of node.js running on a fresh new UDOO (Ubuntu 11.x) has been:

    1.) Download the sources from the node.js site: http://nodejs.org/download/
    An alternative is to download the pre-compiled binaries here: https://github.com/pilwon/nodejs-for-linaro-ubuntu

    2.) Unzip the source package and cd into it

    3.) Compile and install with (i am not root user usually)

    Code:
    ./configure --without-snapshot
    make
    sudo make install 
    The make step should take around 40 minutes (Quad UDOO).

    4.) The new node and npm binaries are waiting for you in /usr/local/bin/node and /usr/local/bin/npm.
    If /usr/local/bin is not yet in your path just add it to your .profile

    5,.) Check if you got the latest and greatest version:

    Code:
    node --version
    Should pass back : v0.10.22 (currently)

    6.) Done && Coffee && add some requires to your new code.


    ANGULAR.JS and METEOR

    If someomne is interested in another topic called Angular.JS and/or Meteor:

    We have been succesful installing the plain Yeoman toolset (including grunt, bower) but trying to add Angular.JS to the story via
    Code:
    yo angular
    came back with compiling errors. So no luck so far - but it it obvious that an AngularJS app should be done and run on the client- which should not be the UDOO.

    The Meteor story is different: Meteor needs to run on the client and the server. Unfortunately Meteor does not support ARM currently.

    If anyone has more luck with both frameworks, please let us know :)

    cheers

    Juergen
     
  2. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Thanks Juergen

    That is a very useful guide to accompany Phuh's node.js UDOO library detailed at viewtopic.php?f=8&t=391
     
  3. Rickor

    Rickor New Member

    Joined:
    Nov 30, 2013
    Messages:
    9
    Likes Received:
    1
    when a problem with install node.js

    Code:
    sudo apt-get install git-core python libssl-dev build-essential
    git clone git://github.com/joyent/node.git node && cd node
    git checkout v0.10.22
    ./configure --without-snapshot
    make        (it will take some time - 40min)
    sudo make install
    
    without git checkout v0.10.22 installed the last 0.11.11-pre and "npm install serialport" runs not with "pre" versions.
     
  4. aterocana

    aterocana New Member

    Joined:
    Mar 1, 2014
    Messages:
    7
    Likes Received:
    0
    After cloning the repository, checking out to v0.10.26 (currently the last one), and executing the other commands Node isn't working. If I execute `node -v` it correctly answer with "0.10.26" but if I run `node` I can't access to the node console. Also npm seems it doesn't work. Any advice?
     
  5. Capstan

    Capstan New Member

    Joined:
    Feb 14, 2014
    Messages:
    18
    Likes Received:
    0
    I didn't bother to compile, I just downloaded the zip file (nodejs-for-linaro-ubuntu-master.zip) and unzipped it. The binaries are working for me, I get the node console, can run node.js programs, and npm works.

    node --version reports v0.10.21
     
  6. aterocana

    aterocana New Member

    Joined:
    Mar 1, 2014
    Messages:
    7
    Likes Received:
    0
    If I compile after a checkout to version 0.10.22 it actually works. I think there's a problem with 0.10.26 and arm because I don't have any issue on a 64bit Arch Linux on my computer. I didn't try with any of 23, 24 or 25.
     
  7. technilinx

    technilinx New Member

    Joined:
    Nov 21, 2013
    Messages:
    8
    Likes Received:
    0
    Has anyone tried versions 0.10.23/24/25 and see if those work. I am having the same issues as aterocana where Node -v works but nothing else. I am going to start at compiling version 23 and work my way up from there, but I was hoping someone maybe able to save me some time.
     
  8. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    or if you don`t want to wait that long try using all 4 cores , which turns that 40 minutes to just over 10.

    try using "make -j4" instead of compiling with a single core !!!
     
  9. technilinx

    technilinx New Member

    Joined:
    Nov 21, 2013
    Messages:
    8
    Likes Received:
    0
    UPDATE:
    So I am having the same issue with version v0.10.23 in where "node -v" is the only command that works. I am now going to try v0.10.22.

    To: peter247
    The issue is NOT that I am unable to build Node.js, (It builds just fine). Just after the install/build is complete, it fails to work beyond a -v query.

    I don't think I had any issues when building and running Node.js on Linaro Ubuntu 11.10. I was able to build and run the most current version on Node.js in that environment. It seems to be an issue with building and running on top of Linaro Ubuntu 12.04 LTS.

    I will need to recheck my findings on the order OS later and post the results I find.
     
  10. technilinx

    technilinx New Member

    Joined:
    Nov 21, 2013
    Messages:
    8
    Likes Received:
    0
    UPDATE:
    Build v0.10.22 and it works as expected. I am able to run node as well as npm.

    If someone out there can help determine why building v0.10.23 and newer does not work correctly, that would be extremely helpful. After reviewing the change log, some bugs that could potentially effect projects were resolved in newer versions of Node.js.

    https://raw.githubusercontent.com/joyen ... /ChangeLog

    Thanks all.
     
  11. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    I installed http://nodejs.org/dist/node-latest.tar.gz last night on my Debain udoo , I had a problems with segment faults at first , but found that I needed to use the "--without-snapshot" , so I know node works on my Debian image .

    root@Udoo:~# node -v
    v0.10.26
     
  12. technilinx

    technilinx New Member

    Joined:
    Nov 21, 2013
    Messages:
    8
    Likes Received:
    0
    Peter:

    Just so I fully understand what you are stating, you install Node.js v0.10.26 on Linaro Ubuntu 12.04 LTS (Release 2.1) and was able to run NPM and run a JS file on Node?

    I only ask as the command "node -v" worked fine, just nothing more than that such as try to run npm -v or even running node by itself.

    Here is the script I run to build node.js on my udoo:

    Code:
    # Download & Unpack Node.js - v. 0.10.26
    echo 'Download Node.js - v. 0.10.26'
    mkdir /tmp/node-install
    cd /tmp/node-install
    wget http://nodejs.org/dist/v0.10.26/node-v0.10.26.tar.gz
    tar -zxf node-v0.10.26.tar.gz
    echo 'Node.js download & unpack completed'
    # Install Node.js
    echo 'Install Node.js'
    cd node-v0.10.26
    ./configure --without-snapshot
    make && checkinstall --install=yes --pkgname=nodejs --pkgversion "0.10.26" --default
    echo 'Node.js install completed'
    
    So, I do use the "--without-snapshot" option in the command line argument. Is something else you did beyond this?

    Thanks for your help,

    Jairo
     
  13. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    No ... I`m running Debian wheezy .
    Yes ... You do need to use the "--without-snapshot" option , without it everything I tried give a segment fault
    Yes ... I have installed firmata , socket.io , johnny-five by using npm install -g firmata etc.

    from my notes , so I can install it again .

    wget http://nodejs.org/dist/node-latest.tar.gz
    tar -zxf node-latest.tar.gz
    cd /???
    ./configure --without-snapshot
    make -j4
    sudo make install

    npm install -g firmata
    npm install -g socket.io
    npm install johnny-five
     
  14. technilinx

    technilinx New Member

    Joined:
    Nov 21, 2013
    Messages:
    8
    Likes Received:
    0
    Peter, thanks for stating the fact that you are NOT using Linaro Ubuntu 12.04 LTS (Release 2.1). In the future, please state that so that we wont have to go back and forth since we are not comparing apples to apples.

    Now, has ANYONE ELSE been able to install Node.js v0.10.26 on Linaro Ubuntu 12.04 LTS (Release 2.1)?

    Thanks,
     
  15. technilinx

    technilinx New Member

    Joined:
    Nov 21, 2013
    Messages:
    8
    Likes Received:
    0
    Opps, sorry Peter. I am just now noticing that you said "Debian" in an early post. Since Ubuntu is Debian based, I made an assumption that we were on the same OS. my bad.

    Sorry Again.
     
  16. peter247

    peter247 Member

    Joined:
    Mar 10, 2014
    Messages:
    263
    Likes Received:
    2
    If I get the time tomorrow I will install the Ubuntu 12.04 LTS image on a spare SD card and see if I can install node.js with the same method which worked for me on Debian .
    Ubuntu is built on Debian Linux so can`t see why it doesn`t work .

    What errors do you get ?

    compiled node.js on Ubuntu 12.04 LTS and you are right .. "npm install -g whatever" just hangs forever !!! , no error .

    Time to go back to a working linux o.s Debian !!!!
     
  17. stefando

    stefando New Member

    Joined:
    May 22, 2014
    Messages:
    2
    Likes Received:
    0
    Hi,

    I opened an related issue on nodejs: https://github.com/joyent/node/issues/7655

    However my UDOO board died and I cannot provide details they need.
    Could you please help and "provide more information regarding the failure, what happens and what your toolchain looks like" there?


    Thanks, Stefan
     
  18. mrar

    mrar New Member

    Joined:
    Dec 30, 2013
    Messages:
    27
    Likes Received:
    2
    I'm unable to install npm install serialport. Has anyone successful install serial port? my os :lubuntu node js version 11.10
     
  19. mrar

    mrar New Member

    Joined:
    Dec 30, 2013
    Messages:
    27
    Likes Received:
    2
    Code:
    sudo apt-get install git-core python libssl-dev build-essential
    git clone git://github.com/joyent/node.git node && cd node
    git checkout v0.10.22
    ./configure --without-snapshot
    make       
    sudo make install
    
    Lastly i can install serialport library into UDOO board running on lubuntu. Thanks for this post. Previously i try to install with 0.11.10, stable and 0.12.x it can be install but when i try to install npm install serialport it fail. I miss to put one command line.. May i know what the functionality of this command?

    Code:
    git checkout v0.10.22
    thanks again...
     
  20. jrullan

    jrullan New Member

    Joined:
    Dec 11, 2014
    Messages:
    28
    Likes Received:
    4
    Hello to all Udooers using Node.js,

    The only version I have successfully installed is 0.10.22.
    I want to get the latest, but it seems something is wrong with versions above 0.10.22. Or maybe with our Udoobuntu distribution???
    There have been a couple of node packages I haven' t been able to run using 0.10.22, so that's my reason for wanting to have the latest stable version.

    So far I've tried the following that didn't work:
    0.10.23
    0.10.24
    0.10.26
    0.10.28
    0.10.35
    0.10.36

    The symptom is the same:
    npm -v <-- hangs forever

    Does anybody knows the reason?
     

Share This Page