5

I need to run nodejs v10.14. I am currently running version 8.16.0. I have found some instructions which I follow but it causes errors (see below).

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

This causes the following output:

## Installing the NodeSource Node.js 10.x repo...


## Populating apt-get cache...

+ apt-get update


Hit:29 http://ppa.launchpad.net/wireshark-dev/stable/ubuntu bionic InRelease  
Err:31 http://ppa.launchpad.net/ehoover/compholio/ubuntu bionic Release        
  404  Not Found [IP: 91.189.95.83 80]
Err:32 http://ppa.launchpad.net/pipelight/stable/ubuntu bionic Release         
  404  Not Found [IP: 91.189.95.83 80]
Reading package lists... Done                       
E: The repository 'http://ppa.launchpad.net/ehoover/compholio/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/pipelight/stable/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Error executing command, exiting

Any idea how I can get nodejs v10.14 (or higher) installed?

mikewhatever
  • 32,243
  • 10
  • 87
  • 98
Richard Bernstein
  • 191
  • 1
  • 2
  • 13
  • Looks like the errors are unrelated to nodejs. Remove the broken PPAs, and then proceed with `sudo apt-get install -y nodejs`. – mikewhatever Jun 28 '19 at 20:08
  • What do I remove the broken PPA's from? I have no idea why this address is showing up. >>404 Not Found [IP: 91.189.95.83 80] – Richard Bernstein Jun 29 '19 at 20:38
  • Not sure why this is relevant, but ok, you remove the PPAs from the list of software sources. It is easy to find how, for example: https://askubuntu.com/questions/307/how-can-ppas-be-removed. – mikewhatever Jun 29 '19 at 21:15
  • 1
    I will try to explain why it is relevent. I need to run nodejs 10 in order to use the microsoft botbuilder software. My XPS easily loaded 8.16.0. I know nothing about how to load nodejs under Ubuntu. I followed the directions in this page: https://joshtronic.com/2018/05/08/how-to-install-nodejs-10-on-ubuntu-1804-lts/. Again I know nothing about ppa's. I wouldn't know a ppa if it landed on my house! There must be as sinple way to upgrade to nodejs 10 (on ubuntu) without getting a phD in Nodejs? Is there perhaps better instructions for someone like me somewhere on how to install nodejs 10? – Richard Bernstein Jul 02 '19 at 22:31
  • I don't know if there are "better instructions", but let's not digress. There are only three commands to copy/paste, and hit Enter. To complete the process, you need to run the last one - `sudo apt install nodejs`. The errors above are related to a different problem, and you may want to post another question about that. – mikewhatever Jul 03 '19 at 21:15
  • 1
    Do these answer your question? [What can I do if a repository/PPA does not have a Release file?](https://askubuntu.com/questions/866901/what-can-i-do-if-a-repository-ppa-does-not-have-a-release-file) and [How to install the latest versions of NodeJS and NPM?](https://askubuntu.com/q/594656) – karel Dec 12 '19 at 04:55
  • Does this answer your question? [How to install the latest versions of NodeJS and NPM?](https://askubuntu.com/questions/594656/how-to-install-the-latest-versions-of-nodejs-and-npm) – Kulfy Dec 13 '19 at 15:55
  • Does this answer your question? [How do I install the latest version of node.js?](https://askubuntu.com/questions/49390/how-do-i-install-the-latest-version-of-node-js) – WinEunuuchs2Unix Jun 02 '20 at 17:24

1 Answers1

12

your errors seem to be issues with getting your APT cache established -- The links in the curl are not responding valid (See the 404 error in the error stack) ...

Not sure this will actually work if its a connectivity issue, but You might try removing the nodejs installation, updating your packages and reinstalling nodejs 12.x with teh 12.x curl, for example.

To Remove and Reinstall Node & NPM:

First remove node:

sudo apt-get remove nodejs npm  

Then update & upgrade:

sudo apt-get update
sudo apt-get upgrade

Then get your desired Node version:

//where setup_12.x, replace with desired major version
curl -sL deb.nodesource.com/setup_12.x | sudo -E bash - 

And then install your new node version:

sudo apt-get install -y nodejs

That should do it. You can check your current version by:

node -v
npm -v

Hope this helps!

Dan
  • 12,494
  • 7
  • 70
  • 94
Hopskotch
  • 123
  • 1
  • 5
  • curl statement: explain! Why is it there? Putting a variable in the environment. Because? – pauljohn32 Mar 14 '20 at 05:21
  • @pauljohn32 `curl` would fetch [this script](https://deb.nodesource.com/setup_12.x) which will then be excuted by bash. – Kulfy Jun 13 '20 at 14:52