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?

RayB
  • 154
  • 1
    @user535733 I think that RayB is talking about the nodejs package –  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 –  Dec 12 '17 at 22:03
  • I guess I'm just biased to node.js after doing a lot of work using it –  Dec 12 '17 at 22:11
  • 1
    But the nodejs package does have v4.2.6 on the repo for 16.04: https://packages.ubuntu.com/xenial/nodejs –  Dec 12 '17 at 22:13
  • Plus it has a [nodejs] tag –  Dec 12 '17 at 22:14
  • This sounds like a duplicate of the "why doesn't ubuntu have latest versions of software" question, which I again can't seem to find right now. – dobey Dec 12 '17 at 22:51
  • Thanks for the comments. I've updated my question to make more sense. @dobey Thanks for suggesting that (https://askubuntu.com/questions/274275/why-ubuntu-software-center-doesnt-have-the-latest-version-of-softwares) it it's a good start. I'm not wondering why the repo doesn't have the latest software. I'm wondering if there's a specific reason it's still on that version instead any other 4.x or other major updates. – RayB Dec 12 '17 at 23:42
  • I'm not sure why –  Dec 12 '17 at 23:48
  • I've put some extra info about it in my answer though –  Dec 12 '17 at 23:48
  • 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 00:27
  • @DavidFoerster That still doesn't explain 18.04. The most recent release at the feature freeze time of Ubuntu 17.10 should have been v8.9.1 unless I messed up my calculations –  Dec 13 '17 at 01:00
  • @Yamboy1: You're right that it doesn't. It only explains the version in Xenial as asked in this question. – David Foerster Dec 13 '17 at 01:05

1 Answers1

6

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/

  • 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: https://askubuntu.com/questions/151283/why-dont-the-ubuntu-repositories-have-the-latest-versions-of-software – RayB Dec 12 '17 at 23:48
  • Yeah, but Ubuntu 18.04 hasn't been release yet and it only has node v6 –  Dec 12 '17 at 23:49
  • Also @RayB if this answered your question, don't forget to click the check mark next to it –  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 https://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