Score:1

nodejs installation error in ubuntu

mq flag

I am trying to install nodejs on a newly built Ubuntu VM(Ubuntu 22.04.1 LTS), but getting the below error.

Preparing to unpack .../nodejs_16.19.1-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (16.19.1-deb-1nodesource1) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_16.19.1-deb-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/node/common.gypi', which is also in package libnode-dev 12.22.9~dfsg-1ubuntu3
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_16.19.1-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Commands I used -

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

apt install nodejs

Running from root user.

Score:0
by flag

There is a conflict between the Node.js package you want to install and the libnode-dev that is already on your computer.

Here is how to solve this problem: first remove the problematic package sudo apt-get remove libnode-dev then update all your packages sudo apt-get update then install Node.js the same way you did before

curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

Now your Node.js should be working properly

I sit in a Tesla and translated this thread with Ai:

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.