进入容器,使用ping时,如果出现:
bash: ping: command not found
解决方法
使用如下命令安装:
apt install iputils-ping
如果上述命令执行错误,先执行以下命令:
apt-get update
知是行之始,行是知之成
当在Docker容器内尝试使用ping命令时,如果遇到'command not found'的错误,可以通过运行'apt install iputils-ping'来安装。如果此命令执行失败,需先更新软件包列表,执行'apt-get update'。完成这些步骤后,ping命令应该可以在容器内部正常使用。
进入容器,使用ping时,如果出现:
bash: ping: command not found
解决方法
使用如下命令安装:
apt install iputils-ping
如果上述命令执行错误,先执行以下命令:
apt-get update
知是行之始,行是知之成
1607
1081
2556

被折叠的 条评论
为什么被折叠?
bash: ping: command not found&spm=1001.2101.3001.5002&articleId=123544764&d=1&t=3&u=a8184f24f1a94f0c8c887f4d680b9ce6)