Score:1

Getting error while installing Nodejs

cn flag

Following the Option 2 from https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04 :

$ cd ~
$ curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
$ sudo bash nodesource_setup.sh

I am getting the error :


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


## Populating apt-get cache...

+ apt-get update
Hit:1 http://repo.mysql.com/apt/ubuntu focal InRelease
Hit:2 http://np.archive.ubuntu.com/ubuntu focal InRelease                                                                            
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease                                                                     
Ign:4 http://oem.archive.canonical.com/updates precise-oem-sp1 InRelease                                                             
Get:5 http://oem.archive.canonical.com/updates precise-oem-sp1 Release [4,325 B]                                                     
Hit:6 http://np.archive.ubuntu.com/ubuntu focal-updates InRelease                                                                    
Get:7 http://oem.archive.canonical.com/updates precise-oem-sp1 Release.gpg [287 B]                                                   
Ign:7 http://oem.archive.canonical.com/updates precise-oem-sp1 Release.gpg                                                           
Hit:8 https://repo.skype.com/deb stable InRelease                                                                                    
Hit:9 http://np.archive.ubuntu.com/ubuntu focal-backports InRelease                                                                  
Hit:11 https://download.sublimetext.com apt/stable/ InRelease                                         
Hit:10 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done                            
W: GPG error: http://oem.archive.canonical.com/updates precise-oem-sp1 Release: Detached signature file '/var/lib/apt/lists/partial/oem.archive.canonical.com_updates_dists_precise-oem-sp1_Release.gpg' is in unsupported binary format
E: The repository 'http://oem.archive.canonical.com/updates precise-oem-sp1 Release' is not signed.
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

Could you please help me through the issue ? I am not able to move forward as the nodejs from default is 10.19, which is not unsupported & unmaintained. I am having issues with this version, and am now not able to upgrade it to the current version.

N0rbert avatar
zw flag
What is your actual Ubuntu version? Do you remember why do you have *precise-oem-sp1* is sources.list?
Score:1
zw flag

It should be noted that precise means Ubuntu Precise Pangolin 12.04 LTS which were released in April of 2012 year, so it is EOL.

Thus you have to manually edit your /etc/apt/sources.list file (or some other *.list file from /etc/apt/sources.list.d/) and comment out lines with precise-oem-sp1 by putting # at their start.

Then run sudo apt-get update, ensure that there are no errors during this operation and finally proceed with NodeJS installation.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.