Broken pipe after trying to install NodeJS 14

Viewed 5061

I am trying to install the latest nodejs pkg (14.17.x). I got the error:

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) .

Now, I am not able to do update and install pkg command, I'm getting the following error:

( dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) ; when trying (( kali@kali:~$ sudo apt update
kali@kali:~$
kali@kali:~$ sudo apt full-upgrade -y
kali@kali:~$
)

dpkg: error processing archive /var/cache/apt/archives/nodejs_14.17.1-deb-1nodesource1_amd64.deb (--unpack):
trying to overwrite '/usr/share/doc/nodejs/api/punycode.md', which is also in package nodejs-doc 12.21.0~dfsg-4
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

Can you help?

3 Answers

trying to overwrite /usr/share/doc/nodejs/api/punycode.md, which is also in package nodejs-doc 12.21.0~dfsg-4

command: dpkg -l | grep node

result like this: ii nodejs-doc 12.21.0~dfsg-3 all API documentation fo...

then command: dpkg -r nodejs-doc

then command: curl -fsSL https://deb.nodesource.com/setup_14.x | bash -

apt-get install -y nodejs

well done! The problem is solved!

Run a verification on each node to check if the installation was successful:

dpkg -l | grep node

Then delete nodejs-doc:

dpkg -r nodejs-doc

Next add the latest node repository to linuxin my case its (14).

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

Run a system update:

sudo apt update

You can now install node:

sudo apt-get install -y nodejs

NB:If you dont want to use sudo for security reasons,you can do this the hard way-:By creating a temp directory,cd into,download node package onto your system and make the package executable,then install it.

Perform another system update:

sudo apt update

You should be able to now check your npm and node versions after this process.

node -v
npm -v

node and np versions

i'm on Mint, but my nodejs is also not working. Using apt list command: the output for nodejs is "unknown":

nodejs/unknown,now 14.17.1-deb-1nodesource1 amd64 [installed]

Working software displays like this in the apt list command:

node-split/focal,focal 1.0.0-1 all

May be related to your problem.

Try running apt list | grep unknown to see if "unknown" pops up.

Related