Psl
Psl

Reputation: 3920

version updation in node.js in ubuntu12

Am trying to update my current node version to latest.

my current node version

udmin@WS1A079:~$ node -v
v0.6.12

so i tried following commands for updating

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:chris-lea/node.js

after that i used

   sudo apt-get update

It outputs following ......

Hit http://dl.google.com stable Release.gpg
Hit http://dl.google.com stable Release                                                                  
Hit http://ppa.launchpad.net precise Release.gpg                                                         
Hit http://extras.ubuntu.com precise Release.gpg                                                         
Hit http://dl.google.com stable/main amd64 Packages                                                      
Hit http://ppa.launchpad.net precise Release                                                             
Hit http://downloads-distro.mongodb.org dist Release.gpg                                                 
Hit http://security.ubuntu.com precise-security Release.gpg                                              
Hit http://extras.ubuntu.com precise Release                                                             
Hit http://dl.google.com stable/main i386 Packages                                                       
Ign http://dl.google.com stable/main TranslationIndex                                                    
Hit http://ppa.launchpad.net precise/main Sources                                                        
Hit http://extras.ubuntu.com precise/main Sources  

    Reading package lists... Done
    W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main amd64 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-amd64_Packages)
    W: Duplicate sources.list entry http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages (/var/lib/apt/lists/dl.google.com_linux_chrome_deb_dists_stable_main_binary-i386_Packages)
    W: You may want to run apt-get update to correct these problems

i again run sudo apt-get update it again outputs the same abow message

How can i solve this problem.

Upvotes: 0

Views: 372

Answers (3)

Sesha Kiran
Sesha Kiran

Reputation: 199

You can try this to upgrade Node to the latest stable or any version. You can also install directly from nodejs.org and don't have to use the command line. Run the following:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

Package "n" denotes a node helper and it will upgrade to the latest stable version. You can also specify the version as below.

sudo n 0.10.32

Once completed, you can check the version installed using

node --version

Upvotes: 0

user3594557
user3594557

Reputation: 23

Try

sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs -y 

Upvotes: 1

Joel Peltonen
Joel Peltonen

Reputation: 13402

If you installed Node from apt-get, try sudo apt-get upgrade instead. Update updates the repository contents in your cache, not the installed programs. If you did not it won't help.

Upvotes: 0

Related Questions