labelstudio镜像构建提示 Problem executing scripts APT::Update::Post-Invoke ‘rm

发布时间:2024年01月10日

构建镜像真难,害惨了我。报如下的错误:

#12 54.36 E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
#12 54.36 E: Sub-process returned an error code
------
executor failed running [/bin/sh -c set -eux ?&& apt-get update ?&& apt-get install --no-install-recommends --no-install-suggests -y ? ? build-essential postgresql-client libmysqlclient-dev mysql-client python3-pip python3-dev ? ? git libxml2-dev libxslt-dev zlib1g-dev gnupg curl lsb-release libpq-dev dnsutils vim && ? ? apt-get purge --assume-yes --auto-remove --option APT::AutoRemove::RecommendsImportant=false ? ? ?--option APT::AutoRemove::SuggestsImportant=false && rm -rf /var/lib/apt/lists/* /tmp/*]: exit code: 100
?

解决方案:

在执行update之前修改下 此文件: /etc/apt/apt.conf.d/docker-clean文件

RUN sed -i -e 's/^APT/# APT/' -e 's/^DPkg/# DPkg/' /etc/apt/apt.conf.d/docker-clean

文章来源:https://blog.csdn.net/henanchina/article/details/135504102
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。