Alpine unsatisfiable constraints: missing packages

邮差的信 提交于 2019-12-12 13:22:44

问题


I am trying to create a docker image based on alpine:3.7, but I get errors while installing some packages with apk add.

Example:

ERROR: unsatisfiable constraints:
  apache2-suexec (missing):
    required by: world[apache2-suexec-custom]
  host (missing):
    required by: world[host]
  lpr (missing):
    required by: world[lpr]
  time (missing):
    required by: world[time]

The cause is that these packages do not exist in alpine repositories yet. How can I solve these issues? Is there any repository from which I can download them?

I'm using this line

FROM alpine:3.7

RUN apk update \
    && apk upgrade \
    && apk --no-cache add --update tcl apache2 apache2-suexec ca-certificates \ 
    apk-tools curl build-base supervisor lpr time dcron host rsync libxml2-utils libxslt

回答1:


You have an issue with the following packages: apache2-suexec, host, lpr and time.

Alpine has some other package structure than main Linux OSs:

  • apache2-suexec is a part of apache2 package;
  • host is a part of bind-tools package;
  • lpr is a part of cups-client package;
  • time is already in alpine image. It uses busybox's time utility.

So, the final Dockerfile is:

FROM alpine:3.7

RUN apk update \
    && apk upgrade \
    && apk --no-cache add --update tcl apache2 ca-certificates \ 
    apk-tools curl build-base supervisor cups-client dcron bind-tools rsync libxml2-utils libxslt


来源:https://stackoverflow.com/questions/48869833/alpine-unsatisfiable-constraints-missing-packages

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