gpt4 book ai didi

python-3.x - 没有安装候选者时如何将libpcre3-dev添加到docker image python3.8-slim

转载 作者:行者123 更新时间:2023-12-02 18:59:02 24 4
gpt4 key购买 nike

我正在为在uwsgi上运行的djangoapp使用Python3.8-slim镜像,但是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

最佳答案

您会收到此消息,而没有apt-get更新。尝试下面的代码。

RUN apt-get update &&\
apt-get install -y libpcre3 libpcre3-dev

关于python-3.x - 没有安装候选者时如何将libpcre3-dev添加到docker image python3.8-slim,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62276423/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com