1

我正在尝试在我的 docker 容器上通过 pip install 安装声音文件。可悲的是我需要自己libsndfile1手动安装apt get。这以某种方式失败了,我真的不明白为什么,有人知道如何安装它。

我在 Win10 上运行 docker desktop - 但容器最终将在 Linux 机器上运行。

 > [ 7/11] RUN apt-get install libsndfile1:
#11 0.618 Reading package lists...
#11 1.814 Building dependency tree...
#11 2.219 Reading state information...
#11 2.829 The following additional packages will be installed:
#11 2.830   libflac8 libogg0 libvorbis0a libvorbisenc2
#11 2.942 The following NEW packages will be installed:
#11 2.944   libflac8 libogg0 libsndfile1 libvorbis0a libvorbisenc2
#11 2.956 0 upgraded, 5 newly installed, 0 to remove and 3 not upgraded.
#11 2.956 Need to get 669 kB of archives.
#11 2.956 After this operation, 2136 kB of additional disk space will be used.
#11 2.956 Do you want to continue? [Y/n] Abort.
------
executor failed running [/bin/sh -c apt-get install libsndfile1]: exit code: 1

有人知道吗?

4

1 回答 1

2

使用带有自动 yes 的命令使其以非交互方式运行。

RUN apt-get --yes install libsndfile1

仅供参考 - 这个危险--force-yes的选项也可用。

如有必要,请绝对酌情使用。

在此处阅读有关 apt-get 选项的信息。

于 2021-03-18T18:16:14.207 回答