ailed to start docker.service:unit docker.service not found.

ailed to start docker.service:unit docker.service not found.

https://img1.sycdn.imooc.com//climg/6309a2f609d7502e31501948.jpg

问题描述:

systemctl start docker 报错;如上截图 

报错内容是 :ailed to start docker.service:unit docker.service not found. 

尝试过的解决方式:

我搜索出来解决方案啦;但是去哪里解决还是不会,那个文件夹,目录是啥,去哪里寻找

这是我参考的博客地址:https://jhooq.com/docker-daemon-centos/

现在报这个错误,我搜索出来 还是不知道如何解决

正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

2回答
Brian 2022-08-27 23:20:25

http://docs.daocloud.io/faq/install-docker-daocloud#linux


请参考这句命令安装docker:


curl -sSL https://get.daocloud.io/docker | sh


  • 提问者 unbreakable_全栈 #1

    curl -sSL https://get.daocloud.io/docker | shhttps://img1.sycdn.imooc.com//climg/630abd000915754423040992.jpg

    2022-08-28 08:55:30
提问者 unbreakable_全栈 2022-08-27 13:17:22

https://img1.sycdn.imooc.com//climg/6309a84109b91ef029001888.jpg

我已经在对应的目录文件夹(/usr/lib/systemd/system/docker.socket)下创建了文件docker.socket  

systemctl daemon-reload    systemctl start docker.socket    systemctl start docker   

使用时还是报错

  • 提问者 unbreakable_全栈 #1

    https://img1.sycdn.imooc.com//climg/6309a92009eca49a29401628.jpg

    2022-08-27 13:18:31
  • 提问者 unbreakable_全栈 #2

    This solution is a little trivial because at first glance you will notice everything (docker installtion, docker.socket) which you did is correct but still you are getting the error Failed to start docker.service: Unit not found.

    In such a cases the docker.socket file should be either at /lib/systemd/system or /etc/systemd/system.

    Goto those file locations and enable the docker.service using the following command -

    老师 这个怎么解决下吗

    2022-08-27 13:24:26
  • 提问者 unbreakable_全栈 #3

    https://img1.sycdn.imooc.com//climg/6309aabb09cf636a00000000.jpg

    2022-08-27 13:25:46
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师