package nodejs (not installed) failed to install/upgrade: trying to overwrite '/usr/include/node/common.gypi', which is also in package libnode-dev 12.22.9~dfsg-1ubuntu3.1

Bug #2043288 reported by R Rahul
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nodejs (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I used nvm use <udated node version>, the node version is updated by using the before mention command, but the problem is that when I close the terminal and reopen it and checked the node version the node version has move to the previous version. Please do give me a solution for this

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: nodejs (not installed)
ProcVersionSignature: Ubuntu 6.2.0-36.37~22.04.1-generic 6.2.16
Uname: Linux 6.2.0-36-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
Date: Fri Nov 10 14:02:28 2023
DpkgTerminalLog:
 Preparing to unpack .../nodejs_20.9.0-1nodesource1_amd64.deb ...
 Unpacking nodejs (20.9.0-1nodesource1) over (12.22.9~dfsg-1ubuntu3.1) ...
 dpkg: error processing archive /var/cache/apt/archives/nodejs_20.9.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.1
DuplicateSignature:
 package:nodejs:(not installed)
 Unpacking nodejs (20.9.0-1nodesource1) over (12.22.9~dfsg-1ubuntu3.1) ...
 dpkg: error processing archive /var/cache/apt/archives/nodejs_20.9.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.1
ErrorMessage: trying to overwrite '/usr/include/node/common.gypi', which is also in package libnode-dev 12.22.9~dfsg-1ubuntu3.1
InstallationDate: Installed on 2023-11-07 (4 days ago)
InstallationMedia: Ubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230807.2)
Python3Details: /usr/bin/python3.10, Python 3.10.12, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.2
 apt 2.4.10
SourcePackage: nodejs
Title: package nodejs (not installed) failed to install/upgrade: trying to overwrite '/usr/include/node/common.gypi', which is also in package libnode-dev 12.22.9~dfsg-1ubuntu3.1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
R Rahul (rahul2109) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nodejs (Ubuntu):
status: New → Confirmed
Revision history for this message
Everton Zanella Alvarenga (everton137) wrote :

I confirm to have found the same error while trying to upgrade to Node 20 on Ubuntu 22.04 with an AMD architecture.

tags: removed: need-duplicate-check
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.