ERROR: unsatisfiable constraints: while installing package in alpine

烂漫一生 提交于 2019-12-24 08:52:52

问题


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?

来源:https://stackoverflow.com/questions/48417891/error-unsatisfiable-constraints-while-installing-package-in-alpine

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!