高山Linux无法在python:3.5-alpine3.4上安装lapack-dev

Jam*_*mes 4 installation lapack apk alpine-linux

我正在使用docker python:3.5-alpine3.4image并尝试安装,lapack-dev但是它一直失败。它抱怨找不到libgfortran.so.5。但是,我尝试安装libgfortran,但这似乎无法解决问题。

(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]
Run Code Online (Sandbox Code Playgroud)

有什么想法我可以解决这个问题吗?这是相关的RUN步骤。

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
Run Code Online (Sandbox Code Playgroud)

Nic*_*lay 9

python:3.5-alpine3.4docker映像基于Alpine v3.4lapack-dev软件包仅出现在中Alpine v3.5。因此,我的建议是lapack-dev按时间从最近的存储库中安装软件包。在这种情况下,您不应该面对过时的依赖关系问题。而且效果很好。

最终Dockerfile是:

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
Run Code Online (Sandbox Code Playgroud)