Skip to content

Commit 28b3b0e

Browse files
luni-moonljharb
authored andcommitted
[readme] Update Alpine Linux Section
- Update install directions to include `python3`, instead of `python2`, which is deprecated since Alpine 3.13.
1 parent b133f66 commit 28b3b0e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
- [Usage](#usage-1)
4848
- [Compatibility Issues](#compatibility-issues)
4949
- [Installing nvm on Alpine Linux](#installing-nvm-on-alpine-linux)
50+
- [Alpine Linux 3.13+](#alpine-linux-313)
51+
- [Alpine Linux 3.5 - 3.12](#alpine-linux-35---312)
5052
- [Uninstalling / Removal](#uninstalling--removal)
5153
- [Manual Uninstall](#manual-uninstall)
5254
- [Docker For Development Environment](#docker-for-development-environment)
@@ -786,13 +788,22 @@ Alpine Linux, unlike mainstream/traditional Linux distributions, is based on [Bu
786788
787789
There is a `-s` flag for `nvm install` which requests nvm download Node source and compile it locally.
788790
789-
If installing nvm on Alpine Linux *is* still what you want or need to do, you should be able to achieve this by running the following from you Alpine Linux shell:
791+
If installing nvm on Alpine Linux *is* still what you want or need to do, you should be able to achieve this by running the following from you Alpine Linux shell, depending on which version you are using:
790792
793+
### Alpine Linux 3.13+
794+
```sh
795+
apk add -U curl bash ca-certificates openssl ncurses coreutils python3 make gcc g++ libgcc linux-headers grep util-linux binutils findutils
796+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
797+
```
798+
799+
### Alpine Linux 3.5 - 3.12
791800
```sh
792801
apk add -U curl bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils
793802
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
794803
```
795804
805+
_Note: Alpine 3.5 can only install NodeJS versions up to v6.9.5, Alpine 3.6 can only install versions up to v6.10.3, Alpine 3.7 installs versions up to v8.9.3, Alpine 3.8 installs versions up to v8.14.0, Alpine 3.9 installs versions up to v10.19.0, Alpine 3.10 installs versions up to v10.24.1, Alpine 3.11 installs versions up to v12.22.6, Alpine 3.12 installs versions up to v12.22.12, Alpine 3.13 & 3.14 install versions up to v14.20.0, Alpine 3.15 & 3.16 install versions up to v16.16.0 (**These are all versions on the main branch**). Alpine 3.5 - 3.12 required the package `python2` to build NodeJS, as they are older versions to build. Alpine 3.13+ requires `python3` to successfully build newer NodeJS versions, but you can use `python2` with Alpine 3.13+ if you need to build versions of node supported in Alpine 3.5 - 3.15, you just need to specify what version of NodeJS you need to install in the package install script._
806+
796807
The Node project has some desire but no concrete plans (due to the overheads of building, testing and support) to offer Alpine-compatible binaries.
797808
798809
As a potential alternative, @mhart (a Node contributor) has some [Docker images for Alpine Linux with Node and optionally, npm, pre-installed](https://github.com/mhart/alpine-node).

0 commit comments

Comments
 (0)