不能在Docker Ubuntu映像中安装软件包 [英] Cannot install packages inside docker Ubuntu image
本文介绍了不能在Docker Ubuntu映像中安装软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
apt-获取安装curl
阅读包列表...完成
构建依赖关系树
阅读状态信息...完成
E:无法找到包卷曲
如何解决这个错误?
解决方案
这是因为图像中没有包缓存,您需要运行:
apt-在安装软件包之前,先获取-qq update
,如果您的命令位于Dockerfile中,需要:
apt-get -qq -y安装curl
I installed Ubuntu 14.04 image on docker. After that, when I try to install packages inside the ubuntu image, I'm getting unable to locate package error:
apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package curl
How to fix this error?
解决方案
It is because there is no package cache in the image, you need to run:
apt-get -qq update
before installing packages, and if your command is in a Dockerfile, you'll then need:
apt-get -qq -y install curl
这篇关于不能在Docker Ubuntu映像中安装软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文