ERROR: unsatisfiable constraints: while installing

2019-07-25 04:55发布

I am trying to build a docker image based on Alpine and I need to install few packages in it. Here is exactly what I am trying to do:

FROM alpine:latest
RUN apk --no-cache add ca-certificates=20161130-r2 openssl=1.0.2k-r0

But when I run docker build, here is the error I get:

RUN apk --no-cache add ca-certificates=20161130-r2 openssl=1.0.2k-r0
 ---> Running in a061dcd5071e
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
ERROR: unsatisfiable constraints:
  ca-certificates-20171114-r0:
    breaks: world[ca-certificates=20161130-r2]
  openssl-1.0.2n-r0:
    breaks: world[openssl=1.0.2k-r0]
The command '/bin/sh -c apk --no-cache add ca-certificates=20161130-r2 openssl=1.0.2k-r0' returned a non-zero code: 2

I have tried running apk update and rebooting the machine but nothing seems to work. I can ping and open "http://dl-cdn.alpinelinux.org/alpine/v3.7/main/", any idea what could be the reason for this error here? Or how can I resolve it?

0条回答
登录 后发表回答