Docker安裝ngnix使用ping報錯


最近在學習docker時,由於docker維護的dockerHub遠程倉庫的鏡像文件比普通的文件小得多,所以經常碰到的情況是,一般常用的命令,會出現no command的情況。今天安裝ping的時候就出現問題了

 

ping的安裝命令:

apt-get install -y inetutils-ping

 

 

root@ee413c6798e5:/# apt-get install inetutils-ping
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package inetutils-ping

 

正確的操作是;

1)這時候需要敲:apt-get update,這個命令的作用是:同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,這樣才能獲取到最新的軟件包。
2)等更新完畢以后再敲命令:apt-get install iputils-ping命令即可。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM