1

I'm trying to follow this instruction (from How to Install the Latest Versions of NodeJS and NPM for Ubuntu 14.04 LTS):

apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
apt-add-repository "deb https://deb.nodesource.com/node_5.x $(lsb_release -sc) main"
apt-get update
apt-get install nodejs

Where it is mentioned that I can replace that URL with a different repository. I need a version greater than 0.10.37 - which is the max version the chris-lea repository seems to provide - but lower than 5.x. (I have removed the chris-lea repository).

However, I'm not at all sure what the URL actually has to refer to, when looking at this link: https://nodejs.org/dist/v0.10.40/

Then, when I try to install node v0.12 with these commands:

curl -sL https://deb.nodesource.com/setup_0.12 | sudo -E bash -
sudo apt-get install -y nodejs

I get 0.10.25.

How can I either: remove all traces of node from apt-get so that I can install it manually, or update the apt-get repository details to get the correct version?

1

1 Answer 1

1

I found a set of scripts and needed to fix it to work. Source here: https://gist.github.com/msporny/5019c4bed5415b745edd

1) Setup apt for 0.10

curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash -

2) Find the exact version you have setup

apt-cache policy nodejs

3) Install that version of 0.10. For me I did

sudo apt-get install -y nodejs=0.10.48-*

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .