0

I've been looking at some pages that explain how to install nodejs 4.* on Ubuntu 14.04 but it doesn't install and tells me that I already have the latest version:

$ curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -

## Installing the NodeSource Node.js v4.x LTS Argon repo...


## Populating apt-get cache...

+ apt-get update
Ign http://archive.canonical.com precise InRelease
Ign http://extras.ubuntu.com trusty 
.
.
.        
Ign http://jp.archive.ubuntu.com trusty/restricted Translation-en_US           
Ign http://jp.archive.ubuntu.com trusty/universe Translation-en_US             
W: Failed to fetch http://dl.google.com/linux/webdesigner/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)

E: Some index files failed to download. They have been ignored, or old ones used instead.
Error executing command, exiting

$ sudo apt-get install nodejs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nodejs is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 173 not upgraded.

$ node --version
v0.10.25

There is an error at the end of the curl command but I don't know if that' related. I'm following this guide - https://nodejs.org/en/download/package-manager/ - but other pages seem to be the same. What's wrong?

Martyn
  • 6,031
  • 12
  • 55
  • 121
  • The same problem was pretty common a few months ago with Google Chrome: http://askubuntu.com/questions/743814/unable-to-find-expected-entry-main-binary-i386-packages-chrome Maybe you can find some information there. – nicovank Oct 23 '16 at 00:02
  • This answer from Hari Krisnan helped - http://stackoverflow.com/questions/34974535/install-latest-nodejs-version-in-ubuntu-14-04 – Martyn Oct 23 '16 at 00:26

1 Answers1

2

hey for that the most simple solution is to use nvm (node version manager) it by using nvm you can easily switch to any version of node with a simple command follow link below to install nvm. https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps

Shumi Gupta
  • 1,505
  • 2
  • 19
  • 28