distributions icon indicating copy to clipboard operation
distributions copied to clipboard

[ERROR] `nodejs` package does not provide virtual `node-types-node` dependency found/required on Ubuntu, Debian

Open m-ueberall opened this issue 2 years ago • 2 comments

Describe your bug Currently, the nodesource nodejs packages do not provide the virtual node-types-node dependency which is found in (almost?) all Debian/Ubuntu source packages. This means that it's not possible to simply use the former to replace their Debian/Ubuntu counterpart when, e.g., trying to build/backport packages from source.

Distribution Information:

  • OS: Ubuntu/Debian (all current versions)

Node Version:

  • Node: all tested versions (e.g., 16.x, 18.x versus those that come with Ubuntu/Debian)

To Reproduce Steps to reproduce the behavior:

  1. Register the third party nodesource repository in question
  2. Install/update nodejs
  3. Try to install node-types-node (e.g., by installing all required dependencies when trying to rebuild a Debian/Ubuntu node* package from source using apt-get build-dep ...) – this fails as only the "original" nodejs package provides this, but its newer nodesource counterpart does not.

Expected behavior The above dependency is fulfilled using the newer/current nodesource nodejs package.

m-ueberall avatar Dec 30 '22 20:12 m-ueberall

Somewhat related: It would be helpful if the nodejs packages would also replace the Debian/Ubuntu libnodeNN[N] packages when upgrading from their "original" counterparts. Currently, this requires manual intervention on, e.g., Ubuntu Jammy:

root@pbuilder-amd64(ubuntu-jammy-amd64):/# apt upgrade
[…]
The following packages will be upgraded:
  nodejs
[…]
Get:5 https://deb.nodesource.com/node_16.x jammy/main amd64 nodejs amd64 16.19.0-deb-1nodesource1 [27.2 MB]                      
Fetched 30.3 MB in 3s (9819 kB/s)                                                        
[…]
Preparing to unpack .../nodejs_16.19.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (16.19.0-deb-1nodesource1) over (12.22.9~dfsg-1ubuntu3) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_16.19.0-deb-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in package libnode72:amd64 12.22.9~dfsg-1ubuntu3
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_16.19.0-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@pbuilder-amd64(ubuntu-jammy-amd64):/#

m-ueberall avatar Dec 30 '22 20:12 m-ueberall

Same problem:

$ sudo apt-get remove libnode72
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  nodejs
The following packages will be REMOVED
  libnode72
The following packages will be upgraded:
  nodejs
1 to upgrade, 0 to newly install, 1 to remove and 59 not to upgrade.
Need to get 28.7 MB of archives.
After this operation, 145 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://deb.nodesource.com/node_18.x jammy/main amd64 nodejs amd64 18.16.0-deb-1nodesource1 [28.7 MB]
Fetched 28.7 MB in 2s (12.1 MB/s)  
(Reading database ... 414633 files and directories currently installed.)
Preparing to unpack .../nodejs_18.16.0-deb-1nodesource1_amd64.deb ...
Unpacking nodejs (18.16.0-deb-1nodesource1) over (12.22.9~dfsg-1ubuntu3) ...
dpkg: error processing archive /var/cache/apt/archives/nodejs_18.16.0-deb-1nodesource1_amd64.deb (--unpack):
 trying to overwrite '/usr/share/systemtap/tapset/node.stp', which is also in package libnode72:amd64 12.22.9~dfsg-1ubuntu3
Errors were encountered while processing:
 /var/cache/apt/archives/nodejs_18.16.0-deb-1nodesource1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I had to remove one by one (nodejs, then libnode72).

kenorb avatar Jun 20 '23 20:06 kenorb