installation fails due to broken dependencies

Bug #1517491 reported by Karl-Philipp Richter
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
npm (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

`sudo apt-get update && sudo apt-get -f install npm` fails with

    Reading package lists... Done
    Building dependency tree
    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-gyp (>= 0.10.9) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: npm (not installed)
Uname: Linux 4.2.5-040205-generic x86_64
ApportVersion: 2.19.1-0ubuntu5
Architecture: amd64
Date: Wed Nov 18 15:21:24 2015
InstallationDate: Installed on 2015-09-14 (64 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
MarkForUpload: True
SourcePackage: npm
SystemImageInfo: Error: command ['system-image-cli', '-i'] failed with exit code 2:
UpgradeStatus: Upgraded to wily on 2015-10-23 (26 days ago)

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue.

I wasn't able to reproduce this issue on Ubuntu 15.10, npm installed fine without problems for me. Looks like it has problem finding a version of node-gyp which satisfies the version requirement, could you please attache the output of `apt-cache policy node-gyp`?

Changed in npm (Ubuntu):
status: New → Incomplete
tags: added: unmetdeps
Revision history for this message
Karl-Philipp Richter (krichter722) wrote :
Download full text (3.3 KiB)

Verified this on a just upgraded Ubuntu 15.10 where installation fails with

    $ sudo apt-get install npm
    Reading package lists... Done
    Building dependency tree
    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: nodejs but it is not going to be installed
           Depends: node-abbrev (>= 1.0.4) but it is not going to be installed
           Depends: node-ansi (>= 0.3.0-2) but it is not going to be installed
           Depends: node-ansi-color-table but it is not going to be installed
           Depends: node-archy but it is not going to be installed
           Depends: node-block-stream but it is not going to be installed
           Depends: node-fstream (>= 0.1.22) but it is not going to be installed
           Depends: node-fstream-ignore but it is not going to be installed
           Depends: node-github-url-from-git but it is not going to be installed
           Depends: node-glob (>= 3.1.21) but it is not going to be installed
           Depends: node-graceful-fs (>= 2.0.0) but it is not going to be installed
           Depends: node-inherits but it is not going to be installed
           Depends: node-ini (>= 1.1.0) but it is not going to be installed
           Depends: node-lockfile but it is not going to be installed
           Depends: node-lru-cache (>= 2.3.0) but it is not going to be installed
           Depends: node-minimatch (>= 0.2.11) but it is not going to be installed
           Depends: node-mkdirp (>= 0.3.3) but it is not going to be installed
           Depends: node-gyp (>= 0.10.9) but it is not going to be installed
           Depends: node-nopt (>= 3.0.1) but it is not going to be installed
           Depends: node-npmlog but it is not going to be installed
           Depends: node-once but it is not going to be installed
           Depends: node-osenv but it is not going to be installed
           Depends: node-read but it is not going to be installed
           Depends: node-read-package-json (>= 1.1.0) but it is not going to be installed
           Depends: node-request (>= 2.25.0) but it is not going to be installed
           Depends: node-retry but it is not going to be installed
           Depends: node-rimraf (>= 2.2.2) but it is not going to be installed
           Depends: node-semver (>= 2.1.0) but it is not going to be installed
           Depends: node-sha but it is not going to be installed
           Depends: node-slide but it is not going to be installed
           Depends: node-tar (>= 0.1.18) but it is not going to be installed
           Depends: node-underscore but it is not going to be installed
           Depends: node-which but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

The requested output:

    $ sudo apt-cache policy node-gyp
    node-gyp:
      Install...

Read more...

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for providing the requested information, that looks right.

>a just upgraded Ubuntu 15.10

Hm... my 15.10 vm is a clean install, so maybe this issue is affected by some packages from older releases?

Ok, here's a couple of questions:
1. Usually when packages have unmet dependencies, some other installed packages are conflicting and prevent the an underlying package from being installed. Could you try to drill down from one of the packages which isn't going to be installed and see whether something is uninstallable because it conflicts with another package?
2. Do you have packages installed from any PPAs which might affect these packages?
3. Out of curiosity, could you test switching to a different package mirror and see whether you can install then? In case the mirror has some temporarily missing package (version) that would explain why I can install it.

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

[Expired for npm (Ubuntu) because there has been no activity for 60 days.]

Changed in npm (Ubuntu):
status: Incomplete → Expired
Revision history for this message
XiaoGuo, Liu (liu-xiao-guo) wrote :

I have this issue in the Ubuntu Core "classic" app on the snapdragon 410c board.

(classic)liu-xiao-guo@localhost:~$ sudo apt install npm
Reading package lists... Done
Building dependency tree
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-gyp (>= 0.10.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Changed in npm (Ubuntu):
status: Expired → New
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Hi,

First of all, which Ubuntu release are you running? (Asking because 15.10 where this issue was originally reported against has reached end of life)

I assume that the snapdragon 410c board is some sort of arm development board, so I can't test with that, but I was able to install npm without issues on my 16.04 vm. Could you try with some of the suggestions from comment #4?

Revision history for this message
Vincent Gerris (vgerris) wrote :

this seems like a dependency issue in the npm package and a side effect of that.
Also reported in :
https://bugs.launchpad.net/ubuntu/+source/npm/+bug/1809828

I think one of them should be closed, the other seems a bit clearer.

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

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

Changed in npm (Ubuntu):
status: New → Confirmed
Revision history for this message
Vincent Gerris (vgerris) wrote :

This is also reported in :
https://bugs.launchpad.net/ubuntu/+source/npm/+bug/1809828

I have this issue on the up to date Ubuntu 18.04 LTS today (used this workaround :
https://askubuntu.com/questions/1088662/npm-depends-node-gyp-0-10-9-but-it-is-not-going-to-be-installed).

Seems like a dependency issue of the npm package to me, which should be fixed.

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.