Install NodeJS v7.x on Debian Jessie
By Pierre-Alain B on Sunday, February 19 2017, 09:09 - Permalink
It is rather easy to deploy NodeJS v7.0 on Debian Jessie. First, it is necessary to add the deb repository for nodejs in /etc/apt/sources.list.d/nodesource.list
:
deb https://deb.nodesource.com/node_7.x jessie main deb-src https://deb.nodesource.com/node_7.x jessie main
Then, let's add a package preference in /etc/apt/preferences.d/node
:
Package: nodejs Pin: release o=Node Source Pin-Priority: 1200
or
Package: * Pin: release o=Node Source Pin-Priority: 1200
I am rather reluctant to use the second option (with the wildcard) as it would imply that the nodesource.com deb repository could replace any package. Without the wildcard, there is a risk to see some dependences not deployed as expected... at the time of writing, it seems that limiting the priority to "nodejs" is sufficient ti have version 7.5.0 installed.
Enjoy!