-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work on Alpine linux (musl) #694
Comments
I found a repo with Alpine(musl) support patch: https://github.com/shyim/fnm-alpine , and can we get Alpine official support? |
we need to add another rust build for that. could be a nice contribution |
I just update fnm alpine version on my repo: https://github.com/vanaware/fnm-alpine curl -fsSL https://vanaware.github.io/fnm-alpine/install.sh | ash No needed to change rust build, basicaly just needed to change node source files to this repo: Known bugs:
Edit:
|
I'm offering a native solution in #1109, just three lines of code. A test build patched upon a5a497b is available here. And following commands.md, add these to your shell rc: export FNM_NODE_DIST_MIRROR=https://unofficial-builds.nodejs.org/download/release
export FNM_ARCH=x64-musl Reload by Now you can install like |
If anyone use
btw only required dep is |
Wow, I think the artifact is already expired but it seems the expiration date is 90 days by default. Since you noticed that, I've uploaded the assets to release with hashes. Maybe you'll find it useful to verify the checksum in the script. |
Just FYI: #1109 is merged so Edit: a new release is already available and I've removed my fork. |
Here is a complete example that works with Alpine 3.17 and the default ash shell: # Resolves linking errors such as:
# Error loading shared library libstdc++.so.6: No such file or directory (needed by /root/.local/state/fnm_multishells/15_1718461045839/bin/node)
apk add libstdc++6 libstdc++
mkdir bin/
cd bin/
wget https://github.com/Schniz/fnm/releases/download/v1.37.1/fnm-linux.zip
unzip fnm-linux.zip
chmod +x fnm
cd -
export PATH=$(pwd)/bin/:$PATH
eval "$(fnm env)"
export FNM_NODE_DIST_MIRROR=https://unofficial-builds.nodejs.org/download/release
export FNM_ARCH=x64-musl
cd ci/
fnm install
fnm use
npm ci |
Is there a way to make the --edit-- Ok I figured, opening the MR. |
Yeah, I'm a bit lazy to only get rid of the hardcoded arch check. After #1271 is merged you no longer need to set |
unfortunately #1271 can't be merged without supporting the formal nodejs mirror which doesn't have musl builds. we have to have multiple platform support or figure out the lack of glibc in runtime. |
I don't know enough to make a suggestion, except that this is still the case for v1.38.1. |
If your platform is x64 you can use the alpine (not official) testing aport where it builds fnm using the unofficial mirrors.
If you want use the official builds from the github releases, then you need to setup the envs (and install libstdc++)
|
I've installed it as guide described.
The text was updated successfully, but these errors were encountered: