Distributions: can't install nodejs 8 on ubuntu 19.04

Created on 2 Jul 2019  路  3Comments  路  Source: nodesource/distributions

can't install nodejs 8 on ubuntu 19.04.
Even after using "curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -" , system install
nodejs 10.15.2

Most helpful comment

hi @thameemk612, thank you for reach out to us, as you mentioned, the normal workflow is trying to get the latest version of Node.js by default. but if you want any specific version, there is a solution in the FAQ section:
https://github.com/nodesource/distributions/issues/657

let me post a recap:

  • Remove the current nodejs installed:
sudo apt-get purge nodejs 
  • Open preference
sudo vim /etc/apt/preferences.d/nodesource 
  • Paste this configuration:
Package: *
Pin: origin deb.nodesource.com
Pin-Priority: 600
  • Verify the change:
apt-cache policy nodejs
  • trying again to install Node.js
sudo apt-get install nodejs

Please let me know if this solution works for you.

Regards,

All 3 comments

hi @thameemk612, thank you for reach out to us, as you mentioned, the normal workflow is trying to get the latest version of Node.js by default. but if you want any specific version, there is a solution in the FAQ section:
https://github.com/nodesource/distributions/issues/657

let me post a recap:

  • Remove the current nodejs installed:
sudo apt-get purge nodejs 
  • Open preference
sudo vim /etc/apt/preferences.d/nodesource 
  • Paste this configuration:
Package: *
Pin: origin deb.nodesource.com
Pin-Priority: 600
  • Verify the change:
apt-cache policy nodejs
  • trying again to install Node.js
sudo apt-get install nodejs

Please let me know if this solution works for you.

Regards,

Thanks @johnny4young , Its working

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bewam picture bewam  路  4Comments

Ignition picture Ignition  路  4Comments

ErisDS picture ErisDS  路  5Comments

davidmcl picture davidmcl  路  6Comments

muhhizbe picture muhhizbe  路  6Comments