stress的安装出了问题
来源:3-11 Dockerfile实战(2)
weixin_慕标2479954
2020-10-13
老师,这是我的错误以及我的dockerfile,连的网就是国内正常的网,但是貌似我的stress就安装不了。您帮我看看这是什么问题,谢谢
写回答
1回答
-
麦兜搞IT
2020-12-13
我刚试了试,没有问题。 试试先apt-get update,再install
docker run --rm -it ubuntu sh # # # apt-get install -y stress Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package stress # apt-get update Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB] Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Get:3 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB] Get:5 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB] Get:6 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB] Get:7 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB] Get:8 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB] Get:9 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [884 kB] Get:10 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [30.4 kB] Get:11 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [136 kB] Get:12 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [876 kB] Get:13 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [4248 B] Get:14 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [495 kB] Get:15 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [1167 B] Get:16 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [103 kB] Get:17 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [645 kB] Fetched 16.6 MB in 2s (8870 kB/s) Reading package lists... Done # apt-get install -y stress Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: stress 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. Need to get 18.4 kB of archives. After this operation, 55.3 kB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 stress amd64 1.0.4-6 [18.4 kB] Fetched 18.4 kB in 0s (181 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package stress. (Reading database ... 4121 files and directories currently installed.) Preparing to unpack .../stress_1.0.4-6_amd64.deb ... Unpacking stress (1.0.4-6) ... Setting up stress (1.0.4-6) ... # stress --version stress 1.0.4 #
00
相似问题