Docker:安装apt-utils时遇到问题 [英] Docker: Having issues installing apt-utils

查看:298
本文介绍了Docker:安装apt-utils时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Docker上安装 apt-utils ,因为当我刚刚执行 apt-get update 时,我得到了错误: debconf:延迟软件包配置,因为未安装apt-utils .因此,我添加了一行来安装 apt-utils (以及 curl ):

I am trying to install apt-utils on Docker because when I was just doing apt-get update, I was getting the error: debconf: delaying package configuration, since apt-utils is not installed. So I added a line to install apt-utils (along with curl):

RUN apt-get update && apt-get install -y apt-utils && apt-get install -y curl

但是,我仍然遇到该错误,使我相信我的命令无效.下面是我尝试构建图像时的输出.

But, I am still getting that error leading me to believe that my command didn't work. Below is my output when I try to build the image.

Step 5/12 : RUN apt-get update && apt-get install -y apt-utils && apt-get install -y curl
 ---> Running in 6e6565ff01bd
Get:1 http://security.debian.org jessie/updates InRelease [94.4 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
Get:4 http://deb.debian.org jessie Release [148 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [624 kB]
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [23.0 kB]
Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.1 MB in 6s (1541 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libapt-inst1.5
The following NEW packages will be installed:
  apt-utils libapt-inst1.5
0 upgraded, 2 newly installed, 0 to remove and 24 not upgraded.
Need to get 537 kB of archives.
After this operation, 1333 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian/ jessie/main libapt-inst1.5 amd64 1.0.9.8.4 [169 kB]
Get:2 http://deb.debian.org/debian/ jessie/main apt-utils amd64 1.0.9.8.4 [368 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 537 kB in 0s (557 kB/s)
Selecting previously unselected package libapt-inst1.5:amd64.
(Reading database ... 21676 files and directories currently installed.)
Preparing to unpack .../libapt-inst1.5_1.0.9.8.4_amd64.deb ...
Unpacking libapt-inst1.5:amd64 (1.0.9.8.4) ...
Selecting previously unselected package apt-utils.
Preparing to unpack .../apt-utils_1.0.9.8.4_amd64.deb ...
Unpacking apt-utils (1.0.9.8.4) ...
Setting up libapt-inst1.5:amd64 (1.0.9.8.4) ...
Setting up apt-utils (1.0.9.8.4) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Reading package lists...
Building dependency tree...
Reading state information...
curl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.
Removing intermediate container 6e6565ff01bd
 ---> f65e29c6a6b9
Step 6/12 : RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
 ---> Running in f5764ba56103
Detected operating system as debian/8.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Running apt-get update... done.
Installing debian-archive-keyring which is needed for installing
apt-transport-https on many Debian systems.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/github_git-lfs.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.
Removing intermediate container f5764ba56103
 ---> a4e64687ab73

是什么原因造成的,我该如何解决?谢谢!

What is causing this and how can I fix it? Thank you!

推荐答案

这实际上不是错误,可以忽略它.我已经构建了很多容器映像,而其中的任何一个都没有apt-utils,并且不管此警告消息如何,所有软件包安装都可以正常进行.

This is not actually an error and it is safe to ignore it. I have built a large number of container images without ever having apt-utils on any of them and regardless of this warning message, all package installs go through and work normally.

无论如何,如果您想拥有apt-utils,请安装它.它将在一次时发出警告,然后消失,以后再调用apt-get(如在您自己的日志中看到的, curl 已安装而没有该消息)

Anyway, if you want to have apt-utils - install it. It will give you this warning once and then it will disappear for future invocations of apt-get (as you can see in your own log, curl got installed without that message).

注意,如果您安装apt-utils,则会收到其他警告(因为现在安装程序可以可以运行交互式配置,并且会尝试并失败).要禁止显示这些软件包,并使其软件包具有默认设置的交互式配置,请像这样 DEBIAN_FRONTEND = noninteractive apt-get install -y pkgs ....

NOTE if you install apt-utils, you will get other warnings (because now the installer can run interactive config and will attempt that and fail). To suppress those and have packages that have interactive config with their defaults, run apt-get like this DEBIAN_FRONTEND=noninteractive apt-get install -y pkgs....

这篇关于Docker:安装apt-utils时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆