Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] Node.js 18 on Ubuntu 22.04 Installation fail #1737

Closed
FelipeSavazii opened this issue Dec 22, 2023 · 3 comments
Closed

[ERROR] Node.js 18 on Ubuntu 22.04 Installation fail #1737

FelipeSavazii opened this issue Dec 22, 2023 · 3 comments

Comments

@FelipeSavazii
Copy link

Describe your bug
A clear and concise description of what the bug is.

Distribution Information:

  • OS: Ubuntu
  • Version: 22.04.03 LTS

Node Version:

  • Node: Node.js v18.19

To Reproduce
Steps to reproduce the behavior:

  1. Execute Installation instructions for Node.js v18.19 on "https://github.com/nodesource/distributions" to Ubuntu:
  2. Run sudo apt-get install nodejs -y

Expected behavior
An error when unpack nodejs:

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

Screenshots
image

@FelipeSavazii
Copy link
Author

FelipeSavazii commented Dec 22, 2023

Sorry for my bad English 😭

@JesusPaz JesusPaz self-assigned this Dec 26, 2023
@Vasiharan
Copy link

I am also getting this error

@JesusPaz
Copy link
Contributor

Try removing all the nodejs packages present in your system:

sudo apt-get remove --purge nodejs libnode-dev
sudo apt-get autoremove
sudo apt-get clean

then install the version you need:

curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\
sudo apt-get install -y nodejs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants