ubuntu 在构建停靠文件时运行“apt install software-properties-common”时出现“python3.10”错误

ffscu2ro  于 2023-02-07  发布在  Python
关注(0)|答案(1)|浏览(244)

目前我的dockerfile只是:

FROM ubuntu:latest
RUN apt-get update
RUN apt install software-properties-common -y

但是,在构建停靠文件并运行步骤apt install software-properties-common -y时,消息中出现以下错误:

#0 41.07 Setting up python3.10-minimal (3.10.6-1~22.04.2) ...
#0 41.16 [Errno 13] Permission denied: '/usr/lib/python3.10/__pycache__/__future__.cpython-310.pyc.139723958934016'dpkg: error processing package python3.10-minimal (--configure):
#0 41.16  installed python3.10-minimal package post-installation script subprocess returned error exit status 1
#0 41.17 Errors were encountered while processing:
#0 41.17  python3.10-minimal
#0 41.18 E: Sub-process /usr/bin/dpkg returned an error code (1)
------
failed to solve: executor failed running [/bin/sh -c apt install software-properties-common -y]: exit code: 100

我想知道你们是否可以帮我解决这个错误,以便完成构建的dockerfile?

fslejnso

fslejnso1#

原来我有snap版本的Docker,这导致了错误,但当我从https://docs.docker.com/engine/install/ubuntu/下载apt版本的Docker时,没有错误。

相关问题