gpt4 book ai didi

python - 无法在Docker中安装libpulse-dev

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

我目前正在尝试构建一个docker容器并安装在一些我将用于机器学习的库中。这是我的Dockerfile:

FROM python:3.6-alpine


ENV PATH :$PATH

ADD . /app
WORKDIR /app

#Install dependencies
RUN echo "===> Installing sudo to emulate normal OS behavior..."
RUN apk --update add sudo
RUN apk --update add libxml2-dev libxslt-dev
RUN apk --update add python py-pip openssl ca-certificates
RUN apk --update add --virtual build-dependencies python3-dev libffi-
dev openssl-dev build-base gfortran
RUN apk --update add libpulse-dev
RUN apk --update add py-pip jpeg-dev zlib-dev
RUN apk --update add swig
RUN apk --update add sshpass openssh-client rsync

#Install python package + requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt

CMD ["python", "import_emails.py"]

我在libpulse-dev上遇到了一些问题,为了安装Pockersphinx lib,我需要安装它,这是我的TraceBack:
Sending build context to Docker daemon  43.12MB
Step 1/17 : FROM python:3.6-alpine
---> a6beab4fa70b
---> Using cache
---> 3ad8815438e3
Step 3/17 : ENV PATH :$PATH
---> Using cache
---> 5b193bb0782c
Step 4/17 : ADD . /app
---> Using cache
---> d68569825af4
Step 5/17 : WORKDIR /app
---> Using cache
---> eb6cad48bc0d
Step 6/17 : RUN echo "===> Installing sudo to emulate normal OS
behavior..."
---> Using cache
---> cd3b9a162fdd
Step 7/17 : RUN apk --update add sudo
---> Using cache
---> 29c02ac6379d
Step 8/17 : RUN apk --update add libxml2-dev libxslt-dev
---> Using cache
---> 484e19727ba8
Step 9/17 : RUN apk --update add python py-pip openssl ca-certificates
---> Using cache
---> 4f8b2f211bbe
Step 10/17 : RUN apk --update add --virtual build-dependencies
python3-dev libffi-dev openssl-dev build-base gfortran
---> Using cache
---> acffb3024164
Step 11/17 : RUN apk --update add libpulse-dev
---> Running in 2f381aef57d1
fetch http://dl-
cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-
cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
libpulse-dev (missing):
required by: world[libpulse-dev]
The command '/bin/sh -c apk --update add libpulse-dev' returned a non-
zero code: 1

任何想法如何解决这个问题?谢谢。

最佳答案

您可以使用pulseaudio-dev代替libpulse-dev
RUN apk --update add

关于python - 无法在Docker中安装libpulse-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47333449/

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