ajmas
Posts: 39
Joined: Sat Mar 24, 2012 2:28 pm

Installing recent node.js on Jessie?

Sun May 01, 2016 12:15 am

What is the recommended way of installing a recent version of node.js on Raspbian Jessie? I see current version is v0.10.29, when I do 'sudo apt-cache show nodejs'.

Also, if we feel a package should be updated in the repository, how should we go about making the request?

Edit: See there are ways to get 4.4.0 (http://weworkweplay.com/play/raspberry-pi-nodejs/), but would still like to see the version in apt updated.

DirkS
Posts: 10292
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Installing recent node.js on Jessie?

Sun May 01, 2016 12:25 am

See e.g. viewtopic.php?f=34&t=140747#p932580
This will get you v5.x
Also, if we feel a package should be updated in the repository, how should we go about making the request?
Raspbian follows Debian, so you would have to contact the Debian package maintainers.
It will not happen, though.
Maybe you can convince the RPF to supply newer packages through their repository.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Installing recent node.js on Jessie?

Sun May 01, 2016 2:01 am

To explain: what debian does is they only issue security updates to older packages. They almost never update their packages to newer version and take a conservative approach so that everything is guaranteed to work. Very nice for servers and people who like that thing, but as you've seen you sometimes get some pretty old packages.
There are 10 types of people: those who understand binary and those who don't.

ajmas
Posts: 39
Joined: Sat Mar 24, 2012 2:28 pm

Re: Installing recent node.js on Jessie?

Sun May 01, 2016 3:55 pm

Does the Raspberry Pi foundation or anyone else not host a repository focused on more recent updates, akin to what Ubuntu does?

User avatar
DougieLawson
Posts: 38448
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Installing recent node.js on Jessie?

Sun May 01, 2016 4:56 pm

ajmas wrote:Does the Raspberry Pi foundation or anyone else not host a repository focused on more recent updates, akin to what Ubuntu does?
That's what the archive.raspberrypi.org repo is for.

/etc/apt/sources.list.d/raspi.list

Code: Select all

deb http://archive.raspberrypi.org/debian/ jessie main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ wheezy main
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

audstanley
Posts: 10
Joined: Fri Nov 28, 2014 12:44 am

Re: Installing recent node.js on Jessie?

Tue Dec 27, 2016 9:33 pm

This will work for EVERY raspberry pi (zero|1|2|3)

Code: Select all

sudo apt-get install git;
git clone https://github.com/audstanley/NodeJs-Raspberry-Pi;
cd NodeJs-Raspberry-Pi;
chmod +x Install-Node.sh;
sudo ./Install-Node.sh;
cd .. && rm -R -f NodeJs-Raspberry-Pi/;
node -v;
source code here: https://github.com/audstanley/NodeJs-Raspberry-Pi

Return to “Advanced users”