5

I'm using docker python:3.5-alpine3.4 image and trying to install lapack-dev but it keeps failing. It is complaining that it can't find libgfortran.so.5. However, I've tried installing libgfortran and that does not seem to fix the problem.

(1/1) Installing libgfortran (5.3.0-r0)
OK: 33 MiB in 37 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
fetch http://dl-8.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-8.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
WARNING: This apk-tools is OLD! Some packages might not function properly.

ERROR: unsatisfiable constraints:
  so:libgfortran.so.5 (missing):

    required by:
      lapack-3.8.0-r1[so:libgfortran.so.5]

Any ideas how I can fix this? Here is the relevant RUN step.

FROM python:3.5-alpine3.4

RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
  && apk update \
  && apk add --update-cache --no-cache libgcc libquadmath musl \
  && apk add --update-cache --no-cache libgfortran \
  && apk add --update-cache --no-cache lapack-dev

1 Answer 1

15

python:3.5-alpine3.4 docker image is based on Alpine v3.4. lapack-dev package was appeared only in Alpine v3.5. So, my suggestion is to install lapack-dev package from the nearest repository by time. In this case you shouldn't face issues with outdated dependencies. And it works pretty well.

The final Dockerfile is:

FROM python:3.5-alpine3.4

RUN echo "http://dl-cdn.alpinelinux.org/alpine/v3.5/community" >> /etc/apk/repositories \
  && apk update \
  && apk add --update-cache --no-cache libgcc libquadmath musl \
  && apk add --update-cache --no-cache libgfortran \
  && apk add --update-cache --no-cache lapack-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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