1

Running Ubuntu 16.04 on 64bit in a VM.

To be clear, I'm wondering why that specific version of nodejs is the one in the repo. Is it because the developer of nodejs choose to make that the default or is it due to something else?

  • 1
    @user535733 I think that RayB is talking about the nodejs package – user689314 Dec 12 '17 at 21:45
  • @Yamboy1 I suspect so, too. But that's not what he said in the title, and we're not psychic. Maybe he's wondering why a 2-year-old OS has 2-year old versions in it. Perhaps we may never know.... – user535733 Dec 12 '17 at 22:00
  • 1
    nodejs is more commonly called node. The only place I've ever seen it being called nodejs is in the ubuntu repos – user689314 Dec 12 '17 at 22:03
  • 1
    But the nodejs package does have v4.2.6 on the repo for 16.04: packages.ubuntu.com/xenial/nodejs – user689314 Dec 12 '17 at 22:13
  • 2
    Sure enough, Node.js v4.2.6 was the most recent release at the feature freeze time of Ubuntu 16.04, Feb 18th 2016. – David Foerster Dec 13 '17 at 0:27
5

The reason that the nodejs package seems so outdated is that it hasn't been updated since Ubuntu 16.04 LTS came out, but you can install v9 of node.js using these commands:

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

Source: https://nodejs.org/en/download/package-manager/

| improve this answer | |
  • Thanks this is a pretty good answer. I guess I didn't realized that Ubuntu 16 was older and that could be the cause. Reading up on this question explained a lot: askubuntu.com/questions/151283/… – RayB Dec 12 '17 at 23:48
  • Yeah, but Ubuntu 18.04 hasn't been release yet and it only has node v6 – user689314 Dec 12 '17 at 23:49
  • Also @RayB if this answered your question, don't forget to click the check mark next to it – user689314 Dec 12 '17 at 23:50
  • 1
    just why, nodejs. Half of the world uses it and you can't update it via apt. Can't believe it. – LowFieldTheory Dec 10 '18 at 23:12
  • Note that setup_9.x is not the only option, and no longer the latest. See github.com/nodesource/distributions/blob/master/README.md#deb (and scroll down slightly) for up-to-date versions of the above commands. – lindes Apr 14 '19 at 20:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.