Installing Node.js in Azure VM

dheerajpv 1 Reputation point
2021-02-28T01:00:34.27+00:00

I got myself an Azure VM (Standard B1s) so that I can deploy my node.js application. I ran sudo apt update to check for updates before I tried to install node. It gave me the following errors:

Hit:1 http://azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:4 https://packages.microsoft.com/repos/azure-cli wheezy InRelease [3187 B]
Hit:5 https://packages.microsoft.com/repos/vscode stable InRelease
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Ign:7 http://ppa.launchpad.net/ubuntu-mate-dev/ppa/ubuntu bionic InRelease
Ign:8 http://ppa.launchpad.net/ubuntu-mate-dev/trusty-mate/ubuntu bionic InRelease
Err:9 http://ppa.launchpad.net/ubuntu-mate-dev/ppa/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.85 80]
Err:10 http://ppa.launchpad.net/ubuntu-mate-dev/trusty-mate/ubuntu bionic Release
  404  Not Found [IP: 91.189.95.85 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/ubuntu-mate-dev/ppa/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/ubuntu-mate-dev/trusty-mate/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.

When I tried to install node using their nodesource repo using curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -, it gave me the same errors.

How can I install node.js in an azure VM?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,013 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. vipullag-MSFT 26,487 Reputation points Moderator
    2021-03-01T06:29:58.257+00:00

    @dheerajpv

    Based on the 404 error on IP address, it is error from PPA. Mostly unavailable packages for ypur specific Ubuntu version.
    To fix the issue, try removing PPA from the pkg source.

    sudo add-apt-repository --remove ppa:ubuntu-mate-dev/ppa  
    sudo apt update  
    

    Hope this helps.

    Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.

    0 comments No comments

  2. Mattias Fransson 1 Reputation point
    2021-07-06T07:45:56.09+00:00

    Suggested fix does not address the real issue. The real issue is network connectivity.

    azureuser@MeanStack:~$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    

    The command above does not work on a vm where installing mongodb works fine.

    Somehow traffic to deb.nodesource.com is discarded. A similar problem seem to occur with ppa.launchpad.net in the OP example - but the problem is not having the repo configured, but that the network traffic is discarded.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.