PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, May 14, 2022

[FIXED] Why does Ubuntu have old versions of nodejs and npm in their apt-get package manager?

 May 14, 2022     apt-get, node.js, npm, ubuntu     No comments   

Issue

When I install nodejs and npm with apt-get

sudo apt-get update
sudo apt-get install nodejs modejs-legacy npm
I have the versions

I get the following versions

npm -v
1.3.10

nodejs -v
v0.10.25

I know how to update these manually, but why does the apt-get package manager have old versions of these packages?


Solution

It's better to use the ppa from nodesource. They have done a great job keeping it updated and offering not only LTS but also latest versions of node available. https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

As easy as running this from your cli:

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

UPDATE:

The reason WHY the package manager has old versions of the binaries is due to the fact it takes time for the maintainers of the provided packages to properly build and test new ones with updated versions.

The good thing is that you can consume and install packages from other repositories (ppa).



Answered By - onel0p3z
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing