Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Saturday, 6 October 2012

How to update/install Node on Ubuntu

I needed to upgrade node.js on my ubuntu dev machine but could not find any good instructions on the internet, i tried several suggestions and finally got it working using an amalgamation of a few blogs.
My current system setup before the process.
ubuntu64:~$ which node
/usr/local/bin/node
ubuntu64:~$ node -v
v0.4.9

Firstly make sure your system is upto date
ubuntu64:~$ sudo apt-get update
ubuntu64:~$ sudo apt-get install git-core curl build-essential
            openssl libssl-dev

Then clone the Node.js repository at git hub:
ubuntu64:~$ git clone https://github.com/joyent/node.git
ubuntu64:~$ cd node

I wanted the latest tagged version
ubuntu64:~/node$ git tag
....
....big list of all the tags
....
ubuntu64:~/node$ git checkout v0.9.2

Then I removed the old version of node
ubuntu64:~$ which node
/usr/local/bin/node
ubuntu64:~$ cd /usr/local/bin
ubuntu64:/usr/local/bin$ sudo rm node

Now to install the desired version, in may case v0.9.2
ubuntu64:/usr/local/bin$ cd ~/node
ubuntu64:~/node$ ./configure
....
ubuntu64:~/node$ make
....
ubuntu64:~/node$ sudo make install
....

Then I had to run the following to update the profile
ubuntu64:~/node$ . ~/.profile
Finally confirm that node is in fact upgraded, and npm has magically been installed too :-) bonus
ubuntu64:~/node$ which node
/usr/local/bin/node
ubuntu64:~/node$ node -v
v0.9.2
ubuntu64:~/node$ which npm
/usr/local/bin/npm
ubuntu64:~/node$ npm -v
1.1.61

Sunday, 22 February 2009

Triple boot install problems and reinstall of GRUB

My main dev machine at home is a triple boot, XP, Vista, Ubuntu machine currently with Ubuntu 8.10, and XP Pro installed. I recently added a new hard drive and had all sorts of problems with getting the boot sequences sorted out.

In a very breif nutshell this is what i did to fix it.

1st get vista booting again

To do this i used the vista boot disk and selected the repair your computer option followed by startup repair, i think i had to reboot and do it again as far as i recall but it did it in the end.

Finally reinstalled grub

First i used my ubuntu live cd and in a console ran

$ sudo grub
This puts you into a grub shell.

grub> find /boot/grub/stage1
This will return a value which looks like (hd?, ?) this is where you will find /boot/grub. '?' will point to the specific partition of your disc which contains the boot grub for example (hd0,1)

grub> root (hd?,?)
Use the value from the find command eg (hd0,1)

Finally the command which will install GRUB into the MBR.

grub> setup (hd?)
grub> quit

Reboot and my Boot menu worked again :-) yay

Hopefully this will help someone.