错误:约束无法满足:so:libvpx.so.6(丢失)

时间:2019-03-03 03:09:26

标签: ffmpeg apk dockerfile alpine

FFMpeg已在本周更新,并导致构建中断。

我可以选择以下哪一项:

  1. 将ffmpeg固定到以前的版本?如果是这样,我如何固定到当前版本之前?
  2. 更新python dockerfile版本

输出:

Step 8/42 : RUN apk add  --no-cache ffmpeg
 ---> Running in 9e46540ed393
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
fetch http://dl-8.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
  so:libvpx.so.6 (missing):
    required by:
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
                 ffmpeg-libs-4.1.1-r2[so:libvpx.so.6]
The command '/bin/sh -c apk add  --no-cache ffmpeg' returned a non-zero code: 3
ERROR: Job failed: exit code 3
FATAL: exit code 3                         

Dockerfile:

FROM python:3.6.7-alpine

ENV LANG C.UTF-8
RUN echo "http://dl-8.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
RUN apk upgrade


RUN addgroup -S django && adduser -S -G django django

RUN apk update
# FFMPEG/Sox dependencies
RUN apk add sox
#RUN apk add  --no-cache libvpx-dev
RUN apk add  --no-cache ffmpeg

1 个答案:

答案 0 :(得分:1)

您仅添加community边缘存储库,而不添加main。这会导致apk出现一些不一致之处。

如果将Dockerfile:4更改为以下内容,它将起作用:

RUN echo -e "http://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories