Illogical dependency resolution: nodejs=12.22.9~dfsg-1ubuntu3.4 attempts to install libnode72 12.22.12~dfsg-1~deb11u4 instead of 12.22.9~dfsg-1ubuntu3.4
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nodejs (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
First of all, thank you for running and maintaining Ubuntu, its a very valuable system and community and probably tons of work.
I ran into a strange issue when attempting to install nodejs and npm on Ubuntu 22.04.1 LTS (amd64), the dependency resolution appears to be illogical. In particular, the output of command #5 below doesn´t appear to make any sense: why would `sudo apt install nodejs=
Manually installing `sudo apt install libnode72=
followed by `sudo apt install nodejs=
does appear to complete without errors, therefore the metadata encoded in the packages is correct.
When I then try to install
`sudo apt install npm`
I run into the same issue:
nodejs : Depends: libnode72 (= 12.22.9~
It appears like the dependency resolver is not behaving correctly.
I am not sure how actionable this is, perhaps there is something wrong with my computer. But it does not behave in the way that a normal user would expect, so just posting this in case others might have run into something similar.
Some additional links and commandline output which might assist in troubleshooting and for future reference:
Package: nodejs (12.22.
https:/
depends on
Package: libnode72 (12.22.
https:/
and suggests
Package: npm (8.5.1~ds-1)
https:/
I apparently have both Ubuntu and Debian repos configured in `/etc/apt/
```
# Ubuntu 22.04.1 LTS
deb http://
deb http://
# Debian Bullseye
deb http://
deb http://
```
However,
`sudo apt -o Debug::
does not show any conflicts:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Entering ResolveByKeep 10%
Dependencies are not satisfied for grub-efi-
Keeping package grub-efi-
Dependencies are not satisfied for grub-efi-
Package grub-efi-
Keeping Package grub-efi-
Calculating upgrade... Done
For reference, I attempted to run the following commands:
# 1.
$ sudo apt install npm
```
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: node-cacache but it is not going to be installed
Depends: node-gyp but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed
Depends: nodejs:any (>= 10)
Recommends: node-tap but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
```
# 2.
$ apt-cache madison nodejs
nodejs | 12.22.12~
nodejs | 12.22.9~
nodejs | 12.22.9~
nodejs | 12.22.9~
# 3.
$ sudo apt install nodejs=
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Depends: libnode72 (= 12.22.9~
E: Unable to correct problems, you have held broken packages.
# 4.
$ sudo apt remove libnode72
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
libnode72
0 upgraded, 0 newly installed, 1 to remove and 342 not upgraded.
After this operation, 36.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 408682 files and directories currently installed.)
Removing libnode72:amd64 (12.22.
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
# 5.
$ sudo apt install nodejs=
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Depends: libnode72 (= 12.22.9~
E: Unable to correct problems, you have held broken packages.
# 6.
$ sudo apt install libnode72=
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
libnode72
0 upgraded, 1 newly installed, 0 to remove and 342 not upgraded.
Need to get 10.8 MB of archives.
After this operation, 41.2 MB of additional disk space will be used.
Get:1 http://
Fetched 10.8 MB in 1s (9,062 kB/s)
Selecting previously unselected package libnode72:amd64.
(Reading database ... 408676 files and directories currently installed.)
Preparing to unpack .../libnode72_
Unpacking libnode72:amd64 (12.22.
Setting up libnode72:amd64 (12.22.
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
# 7.
$ sudo apt install nodejs=
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
npm
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 343 not upgraded.
Need to get 122 kB of archives.
After this operation, 929 kB of additional disk space will be used.
Get:1 http://
Fetched 122 kB in 0s (265 kB/s)
Selecting previously unselected package nodejs.
(Reading database ... 408681 files and directories currently installed.)
Preparing to unpack .../nodejs_
Unpacking nodejs (12.22.
Setting up nodejs (12.22.
update-
Processing triggers for man-db (2.10.2-1) ...
# 8.
$ sudo apt install npm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Depends: libnode72 (= 12.22.9~
E: Unable to correct problems, you have held broken packages.
# 9.
$ sudo apt show nodejs
Package: nodejs
Version: 12.22.12~
Priority: optional
Section: web
Maintainer: Debian Javascript Maintainers <email address hidden>
Installed-Size: 939 kB
Provides: node-types-node (= 12.20.55~
Depends: libc6 (>= 2.2.5), libnode72 (= 12.22.12~
Recommends: ca-certificates, nodejs-doc
Suggests: npm
Conflicts: nodejs-legacy
Breaks: node-babel-runtime (<< 7), node-typescript
Replaces: nodejs-legacy
Homepage: https:/
Tag: devel::interpreter, devel::
implemented-
interface:
protocol::http, protocol::tcp, role::program, scope::application,
works-
Download-Size: 148 kB
APT-Sources: http://
Description: evented I/O for V8 javascript - runtime executable
Node.js is a platform built on Chrome's JavaScript runtime for easily
building fast, scalable network applications. Node.js uses an
event-driven, non-blocking I/O model that makes it lightweight and
efficient, perfect for data-intensive real-time applications that run
across distributed devices.
.
Node.js is bundled with several useful libraries to handle server
tasks:
.
System, Events, Standard I/O, Modules, Timers, Child Processes, POSIX,
HTTP, Multipart Parsing, TCP, DNS, Assert, Path, URL, Query Strings.
N: There are 2 additional records. Please use the '-a' switch to see them.
# 10.
$ sudo apt install npm=8.5.1~ds-1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nodejs : Depends: libnode72 (= 12.22.9~
E: Unable to correct problems, you have held broken packages.
# 11.
$ apt-cache madison libnode72
libnode72 | 12.22.12~
libnode72 | 12.22.9~
libnode72 | 12.22.9~
libnode72 | 12.22.9~
$ apt-cache madison nodejs
nodejs | 12.22.12~
nodejs | 12.22.9~
nodejs | 12.22.9~
nodejs | 12.22.9~
$ apt-cache madison npm
npm | 8.5.1~ds-1 | http://
npm | 8.5.1~ds-1 | http://
npm | 7.5.2+ds-2 | http://
npm | 7.5.2+ds-2 | http://