简体   繁体   English

Docker Alpine Linux软件包被屏蔽

[英]Docker Alpine linux package masked

I am trying to install a package on my docker image that runs alpine but I get the following error, 我正在尝试在运行alpine的docker映像上安装一个软件包,但出现以下错误,

Removing intermediate container 54bbe0932899
Step 14 : RUN apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
 ---> Running in 24d7a8c00c89
fetch http://dl-3.alpinelinux.org/alpine/edge/testing/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/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  openblas-0.2.19-r0:
    masked in: @community
    satisfies: world[openblas]
               openblas-dev-0.2.19-r0[openblas=0.2.19-r0]
  openblas-ilp64-0.2.19-r0:
    masked in: @community
    satisfies:
               openblas-dev-0.2.19-r0[openblas-ilp64=0.2.19-r0]
  openblas-dev-0.2.19-r0:
    masked in: @community
    satisfies: world[openblas-dev]
ERROR: Service 'web' failed to build: The command '/bin/sh -c apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted' returned a non-zero code: 3

Important part of the Dockerfile : Dockerfile重要部分:

FROM python:3.5.2-alpine

ADD repositories /etc/apk/repositories

RUN apk upgrade --update
RUN apk add --update libstdc++ curl ca-certificates bash
RUN apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
RUN apk add --update py-scipy py-numpy py-numpy-dev

The repository file is 存储库文件是

http://dl-cdn.alpinelinux.org/alpine/v3.4/main
@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing
@community http://dl-cdn.alpinelinux.org/alpine/edge/community

How I can force the installation of openblas ? 我怎样才能强制安装openblas

I am new to alpine so apologies if this is a straight forward question. 如果这是一个直截了当的问题,我不熟悉高山,因此深表歉意。

I found the solution, 我找到了解决方案,

the following line: 下一行:

RUN apk add openblas openblas-dev --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted

should be 应该

RUN apk add openblas@community openblas-dev@community --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community/ --allow-untrusted

Now docker continues to the next stage. 现在,泊坞窗继续进行到下一个阶段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM