0

I've seen this question: How to only install updates from a specific repository? but it doesn't help.

I want to install NPM using this script: https://deb.nodesource.com/setup_10.x (not my idea, this is a requirement). This script uses a particular Launchpad PPA: ppa:chris-lea/node.js. Here's the problem:

  • If I run apt-get install --no-install-recommends nodejs I get Node.js installed from Canonical's PPA. This package lacks NPM, and is very far behind Node's last stable release (3 major versions behind).
  • If I run apt-get install nodejs, I do get Node from cris-lea PPA, and it has NPM... but it also installs a ton of unnecessary garbage.

Looking into documentation for apt-get install I cannot find a way to specify a PPA to install from. Maybe I've missed it?


PS. This should happen during CI run, so, no GUI, and, please, no editing of /etc/apt/sources and friends, please.

wvxvw
  • 358
  • What Ubuntu release are you using? (that ppa only goes up to Utopic) If 14.04 what you're saying makes no sense, nodejs has no recommends, installing from that ppa typically only installs a couple of deps. Maybe see here - https://github.com/nodesource/distributions – doug Jul 07 '19 at 18:50
  • @doug I'm on 16LTS release. The differences in terms of installed stuff is about 1.8 GB, but Node isn't the only one being installed, and I don't have enough patience to figure out where this bloat comes from. Maybe it's not the Node, but I don't want to install packages separately anyways. Anyways, I figured why this was happening: Docker running plain sh instead of Bash, and my pipefail settings didn't work, and some other thing prevented this PPA from being added. So, I got original Node.js both times, except when it didn't have recommends, there was no NPM either. – wvxvw Jul 08 '19 at 11:22
  • Anyways, for future reference, I'd still like to know how to do it. – wvxvw Jul 08 '19 at 11:23
  • sudo apt-get install package=version see https://askubuntu.com/questions/92019/how-to-install-specific-ubuntu-packages-with-exact-version – doug Jul 08 '19 at 22:52
  • @doug I don't need version, I need a specific PPA – wvxvw Jul 09 '19 at 08:31

0 Answers0