Hi,
I am trying to use latest version of nodejs-current from edge repo but getting bellow error:
Step 4/15 : RUN apk add nodejs-current-npm --update-cache --repository http://nl.alpinelinux.org/alpine/edge/community
---> Running in 5792dccce101
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.5/community/x86_64/APKINDEX.tar.gz
(1/8) Installing ca-certificates (20161130-r1)
(2/8) Installing c-ares (1.12.0-r1)
(3/8) Installing libgcc (6.2.1-r1)
(4/8) Installing http-parser (2.7.1-r0)
(5/8) Installing libstdc++ (6.2.1-r1)
(6/8) Installing libuv (1.9.1-r0)
(7/8) Installing nodejs-current (8.6.0-r0)
(8/8) Installing nodejs-current-npm (8.6.0-r0)
Executing busybox-1.25.1-r0.trigger
Executing ca-certificates-20161130-r1.trigger
OK: 62 MiB in 34 packages
---> a9dedd608156
Removing intermediate container 5792dccce101
Step 5/15 : RUN node -v
---> Running in 7cf3df972b0f
Error relocating /usr/bin/node: uv_fs_copyfile: symbol not found
The command '/bin/sh -c node -v' returned a non-zero code: 127
Any idea?
@tapas4java nodejs >= 8.5 requires libuv >= 1.14
See https://github.com/nodejs/node/issues/14906
@danilobuerger How and where I can get libuv >= 1.14?
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main libuv
My Dockerfile is like below, am I missing something??
FROM nginx:alpine
## Change alpine version to install latest node
RUN apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/community nodejs-current-npm>8 &&\
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main libuv>1.14
RUN node -v
Thanks @danilobuerger
Able to figure out the issue, the sequence matters it seems. Below works:
## Change alpine version to install latest node
RUN apk add --no-cache --repository http://nl.alpinelinux.org/alpine/edge/main libuv &&\
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community nodejs-current-npm
It sounds like this is solved. But I'd also like to point out that it is generally a bad idea to mix repositories from edge and released versions. You will definitely run into libc dependency problems again at some point.
Most helpful comment