Alpine Linux can't install lapack-dev on python:3.5-alpine3.4
Asked Answered
C

1

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
Christiniachristis answered 9/10, 2018 at 2:19 Comment(0)
P
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
Pheidippides answered 9/10, 2018 at 12:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.