Failed to start dchpd.service: Unit not found.
时间: 2024-03-04 14:45:30 浏览: 142
根据提供的引用内容,你遇到的问题是Failed to start docker.service: Unit not found。这个错误通常是由于docker服务没有正确安装或者启动导致的。为了解决这个问题,你可以尝试几个步骤:
1.检查docker服务是否已经正确安装。你可以使用以下命令来检查docker服务是否已经正确安装:
```shell
sudo systemctl status docker.service
```
如果docker服务已经正确安装,你应该会看到类似于以下内容的输出:
```shell
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-08-10 14:20:20 UTC; 1 weeks 0 days ago
Docs: https://docs.docker.com
Main PID: 1234 (dockerd)
Tasks: 10
Memory: 46.3M
CPU: 1.234s
CGroup: /system.slice/docker.service
├─1234 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
└─5678 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
Aug 10 14:20:20 ubuntu systemd[1]: Starting Docker Application Container Engine...
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="Starting up"
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf"
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="parsed scheme: \"unix\""
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme"
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 <nil>}]
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="ClientConn switching balancer to \"pick_first\""
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="parsed scheme: \"unix\""
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="scheme \"unix\" not registered, fallback to default scheme"
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="ccResolverWrapper: sending new addresses to cc: [{unix:///run/containerd/containerd.sock 0 <nil>}]
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="ClientConn switching balancer to \"pick_first\""
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="Loading containers: start."
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="Loading containers: done."
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="Docker daemon" commit="abcdefg" graphdriver(s)="overlay2" version=20.10.7
Aug 10 14:20:20 ubuntu dockerd[1234]: time="2021-08-10T14:20:20.123456789Z" level=info msg="Daemon has completed initialization"
Aug 10 14:20:20 ubuntu systemd[1]: Started Docker Application Container Engine.
```
如果docker服务没有正确安装,你应该会看到类似于以下内容的输出:
```shell
● docker.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
```
2.如果docker服务没有正确安装,你可以尝试重新安装docker服务。你可以使用以下命令来重新安装docker服务:
```shell
sudo apt-get update
sudo apt-get install docker.io
```
3.如果docker服务已经正确安装,但是仍然无法启动,你可以尝试重新启动docker服务。你可以使用以下命令来重新启动docker服务:
```shell
sudo systemctl restart docker.service
```
阅读全文