Por que o apt tenta instalar o depsite do npm sendo fornecido pelo nodejs?

2

Estou usando repositórios de nós-fonte para instalar o nodejs no Ubuntu Xenial e quando necessário para instalar o pacote npm, o apt tenta instalar o pacote npm real. Isso me deixa confuso, porque o pacote nodejs instalado fornece o npm como um pacote virtual:

Package: nodejs
Version: 8.11.2-1nodesource1
Architecture: amd64
Maintainer: Chris Lea <[email protected]>
Installed-Size: 59949
Depends: libc6 (>= 2.7), libgcc1 (>= 1:3.4), libstdc++6 (>= 4.4.0), python-minimal, ca-certificates
Conflicts: nodejs-dev, nodejs-legacy, npm
Replaces: nodejs-dev (<= 0.8.22), nodejs-legacy, npm (<= 1.2.14)
Provides: nodejs-dev, nodejs-legacy, npm
Homepage: https://nodejs.org
Priority: optional
Section: web
Filename: pool/main/n/nodejs/nodejs_8.11.2-1nodesource1_amd64.deb
Size: 12650798
SHA256: d0d334108873d23567df07e120c82796582296702c50c48546def2772badfa0b
SHA1: 301d07117fd6989ff9833b3d5a6218a097d5be18
MD5sum: 0c12a6e18edc15fd11ee9bb1cacbab70
Description: Node.js event-based server-side javascript engine
 Node.js is similar in design to and influenced by systems like
 Ruby's Event Machine or Python's Twisted.
 .
 It takes the event model a bit further - it presents the event
 loop as a language construct instead of as a library.
 .
 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.

Meu entendimento é que, sobre apt-get install npm , o sistema deve declarar que o pacote npm já está instalado, mas tenta instalar um pacote npm que entra em conflito com o nodejs. Além disso, listar os candidatos de instalação com apt-cache policy não lista o pacote de origem de nós como candidato, o que, de acordo com o meu entendimento, está errado:

# apt-cache policy npm
npm:
  Installed: (none)
  Candidate: 3.5.2-0ubuntu4
  Version table:
     3.5.2-0ubuntu4 500
        500 http://de.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://de.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
     1.3.10~dfsg-1 500
        500 http://archive.ubuntu.com/ubuntu trusty/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu trusty/universe i386 Packages
    
por Arthur le Perroquet 18.05.2018 / 10:03

0 respostas