I am new to Alpine Linux and I tried to install Node.js 4.

According to this I can specify the version like this:

apk add nodejs=4

I also tried this because I though maybe it doesn't understand semantic versions and I saw here that 4.3.0-r0 seems to be the only available version:

apk add nodejs=4.3.0-r0

Both commands lead to an error:

ERROR: unsatisfiable constraints:
    breaks: world[nodejs=4.3.0-r0]

What am I doing wrong?


Use this to list available packages:

apk search --update 'node*'

choose one and install it as next:

apk add nodejs-lts --update

(1/4) Installing libgcc (5.3.0-r0)
(2/4) Installing libstdc++ (5.3.0-r0)
(3/4) Installing libuv (1.9.1-r0)
(4/4) Installing nodejs-lts (4.4.4-r0)
  • Could you elaborate on how my assumptions were wrong? – AndreKR Nov 11 '16 at 16:52
  • It’s named nodejs-lts only in v3.4, it’s just nodejs in further versions or nodejs-current for the “current” version (that’s the upstream’s terminology, it’s non-LTS version). – Jakub Jirutka Sep 23 '17 at 18:31

Alpine is a rolling release distro. Packages for nodejs are dependent from which version of alpine you are using.

In your example, if you need nodejs-4.3x, you should use Alpine 3.3:


This because there is no way yet to install arbitrary an older versions of a package from official repositories.

A possible workaround, if it might be fitting for you, is using an lxc container, where you can specify the alpine version to use, with a small footprint on the host.

  • Alpine is not a rolling release distro. Only edge branch is rolling. – Jakub Jirutka Sep 23 '17 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.