sgerrand / alpine-pkg-glibc

A glibc compatibility layer package for Alpine Linux
2.05k stars 280 forks source link

ERROR: glibc-2.27-r0: failed to rename lib64/ld-linux-x86-64.so.2.apk-new to lib64/ld-linux-x86-64.so.2. #83

Closed kilianc closed 6 years ago

kilianc commented 6 years ago
ERROR: glibc-2.27-r0: failed to rename lib64/ld-linux-x86-64.so.2.apk-new to lib64/ld-linux-x86-64.so.2.

Getting this on

FROM node:10.6.0-alpine

RUN \
  export GLIBC=2.27-r0 && \
  curl -sfL https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub&& \
  curl -sfLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/glibc-$GLIBC.apk && \
  apk add --no-cache glibc-$GLIBC.apk && \
  rm glibc-$GLIBC.apk
sgerrand commented 6 years ago

👋 Thanks for filing this issue. It looks like the base image in the Dockerfile you posted is missing things, e.g. curl.

$ docker build .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM node:10.6.0-alpine
 ---> 166e2eca249b
Step 2/2 : RUN   export GLIBC=2.27-r0 &&   curl -sfL https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub&&   curl -sfLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/glibc-$GLIBC.apk &&   apk add --no-cache glibc-$GLIBC.apk &&   rm glibc-$GLIBC.apk
 ---> Running in 2241e9711757
/bin/sh: curl: not found
The command '/bin/sh -c export GLIBC=2.27-r0 &&   curl -sfL https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub&&   curl -sfLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/glibc-$GLIBC.apk &&   apk add --no-cache glibc-$GLIBC.apk &&   rm glibc-$GLIBC.apk' returned a non-zero code: 127
sgerrand commented 6 years ago

If I add a step which installs the curl and ca-certificates packages to the Dockerfile, the image builds successfully.

$ docker build .
Sending build context to Docker daemon  2.048kB
Step 1/3 : FROM node:10.6.0-alpine
 ---> 166e2eca249b
Step 2/3 : RUN apk add --no-cache --no-progress ca-certificates curl
 ---> Running in 9e092826e3de
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/4) Installing ca-certificates (20171114-r0)
(2/4) Installing libssh2 (1.8.0-r2)
(3/4) Installing libcurl (7.61.0-r0)
(4/4) Installing curl (7.61.0-r0)
Executing busybox-1.27.2-r11.trigger
Executing ca-certificates-20171114-r0.trigger
OK: 7 MiB in 19 packages
Removing intermediate container 9e092826e3de
 ---> 685b6e0b5770
Step 3/3 : RUN   export GLIBC=2.27-r0 &&   curl -sfL https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub&&   curl -sfLO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC/glibc-$GLIBC.apk &&   apk add --no-cache glibc-$GLIBC.apk &&   rm glibc-$GLIBC.apk
 ---> Running in 980dc17dfc8c
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/1) Installing glibc (2.27-r0)
OK: 12 MiB in 20 packages
Removing intermediate container 980dc17dfc8c
 ---> a819c355df7f
Successfully built a819c355df7f
sgerrand commented 6 years ago

Feel free to reopen this issue if you have further information about the error you encountered. 🙇