Monday, October 25, 2010

Node != Nodejs

Recently built a new Ubuntu 10 VM to test out a few Node.js ideas. While support for windows is improving, it just isn’t ready for prime time. I’m very much a linux noob so I just tried following the various guides out there.

I’ve followed these steps successfully recently so it came as a surprise when running:

   1:  neil@ubuntu:~$ cd node
   2:  neil@ubuntu:~/node$ ./configure

resulted in:

   1:  neil@ubuntu:~/node$ ./configure: 4: autoconf: not found
(or some other such error)

Now trying to brute my way through the install I pushed on and ran:

   1:  neil@ubuntu:~/node$ make
   2:  neil@ubuntu:~/node$ sudo make install
furthers errors ensued…

However then running:

   1:  neil@ubuntu:~/node$ node

gave me the oh so informative:

   1:  The program 'node' is currently not installed.  You can install it by typing:
   2:  sudo apt-get install node

DO NOT RUN sudo apt-get install node

As this will install the node module. Confused? Well node != nodejs. node is apparently a Amateur Packet Radio Node program. Not what we want unless you’re into ham radios… Attempting to run node will usually result in something along the lines of:

   1:  axconfig: port 1 not active 
   2:  axconfig: port 2 not active 

 

How to fix all this? Well thanks to stack-overflow and the nodejs group at least I knew where to start:

First remove the node package:

   1:  sudo apt-get remove --purge node
   2:  sudo apt-get clean

 

And then run the following to get a stable version of nodeJS running (e.g. v0.2.4):

   1:  sudo apt-get install build-essential
   2:  cd node
   3:  git checkout v0.2.4
   4:  ./configure
   5:  make
   6:  sudo make install

 

You should now be able to run nodeJS scripts. YMMV

15 comments:

  1. Thank you. The same things in the same order happened with me. But now I know what to do. Again thanks to you

    ReplyDelete
  2. Thanks, I'm looking on this Node != Nodejs !!

    ReplyDelete
  3. thanks man.You saved my day.I am finally able to run "Helloworld"

    ReplyDelete
  4. LOL! I am happy that I am not the first one to make this mistake, and I am happy that you wrote this so that it only cost me 3 minutes. :) Thanks!

    ReplyDelete
  5. Thanks a lot for your support on this issue !!! appreciated ;0)

    Regards Julian

    ReplyDelete
  6. Thanks for this information! Even after following the instructions on this page and removing the 'node' package, and re-installing the 'nodejs' package, it would /still/ not being using the 'node' command, so in the end I added a different apt repository, as explained in the docs here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager Then I ran a 'apt-get update' and updated nodejs and it finally started using the 'node' command!

    ReplyDelete
  7. Thanks for posting such a great article.you done a great job.
    Node JS Online Training

    ReplyDelete
  8. We are well established IT and outsourcing firm working in the market since 2013. We are providing training to the people ,
    like- Web Design , Graphics Design , SEO, CPA Marketing & YouTube Marketing.Call us Now whatsapp: +(88) 01537587949
    : Digital Marketing Training
    Free bangla sex video:careful
    good post outsourcing institute in bangladesh

    ReplyDelete
  9. Extremely useful case! There is bunches of intimation here that could previously any situation income started further to a well off person to person communication cognizant up assessment. Fifa 19 License Key

    ReplyDelete
  10. I was confining a piece of your substance material irately this site and that I consider this net page is believe it or not steady ! hold while inspiration to setting happening. Regcure Pro Freeware

    ReplyDelete
  11. Charming, notice. I just tracked down your blog and expected to declare that i've esteemed examining your weblog posts. Once more after every one in all degree of part of, I can really get involved with your feed, and that I objective you could form quickly! Special Birthday Wishes For Dad

    ReplyDelete