【发布时间】:2019-03-20 16:57:34
【问题描述】:
在一个 docker 容器内(从 node:9 图像创建)我正在尝试使用 apt-get 安装stress-ng 包。但是,由于某种原因,每次我尝试安装它时都会检索到旧版本的包。为了安装软件包,我使用以下命令:
root@7e7a683bf288:/usr/src/app# apt-get update
root@7e7a683bf288:/usr/src/app# apt-get install stress-ng
我得到以下版本:
root@7e7a683bf288:/usr/src/app# stress-ng --version
stress-ng, version 0.01.32
但是,如果可能的话,我想获得最新版本,0.09.42-1 (https://packages.ubuntu.com/cosmic/stress-ng)。我在类似问题中尝试了一些解决方案,但无法使其正常工作。
附加信息:
root@7e7a683bf288:/usr/src/app# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@7e7a683bf288:/usr/src/app# cat /etc/apt/sources.list
deb http://deb.debian.org/debian jessie main
deb http://security.debian.org/debian-security jessie/updates main
deb http://deb.debian.org/debian jessie-updates main
root@7e7a683bf288:/usr/src/app# add-apt-repository
bash: add-apt-repository: command not found
【问题讨论】:
标签: docker debian apt-get docker-container debian-jessie