微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 docker 容器上安装 libsndfile1

如何解决在 docker 容器上安装 libsndfile1

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

我在 Win10 上运行 docker 桌面 - 但容器最终将在 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

有人知道吗?

解决方法

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

RUN apt-get --yes install libsndfile1

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

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

阅读 apt-get 选项 here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。