当没有安装候选对象时,如何将libpcre3-dev添加到docker image python3.8-slim中

问题描述 投票:0回答:2

[我正在将Python3.8-slim图像用于在uwsgi上运行的djangoapp,但uwsgi需要libpcre3-dev才能构建具有pcre支持。

当我添加RUN apt-get install -y libpcre3 libpcre3-dev时>

FROM python:3.8-slim

...

# Configure apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
    && apt-get -y install --no-install-recommends apt-utils 2>&1

...

RUN apt-get install -y libpcre3 libpcre3-dev
RUN pip install uwsgi  # hopefully uwsgi should built with PCRE support now?

到我的dockerfile,我得到

E: Package 'libpcre3-dev' has no installation candidate

我该如何安装?

编辑:这是完整的Dockerfile:https://github.com/timberline-secondary/hackerspace/blob/f36cafd4c7d97eb989c37bbc9dfdc9c8ddf126c5/Dockerfile

我正在对在uwsgi上运行的djangoapp使用Python3.8-slim映像,但是uwsgi需要libpcre3-dev才能构建具有pcre支持的版本。当我添加RUN apt-get install -y libpcre3 libpcre3-dev from python:3.8 -...

python-3.x docker uwsgi pcre
2个回答
0
投票

替换您的行


0
投票

您会收到此消息,但不进行apt-get更新。尝试下面的代码。

© www.soinside.com 2019 - 2024. All rights reserved.