gpt4 book ai didi

docker - (使用 WSL ubuntu 应用程序)系统尚未以系统作为 init 系统 (PID 1) 启动。无法操作

转载 作者:行者123 更新时间:2023-12-02 18:21:07 25 4
gpt4 key购买 nike

我是 Ubuntu 的第一个用户。我在 wmware 中安装 Ubuntu 失败,所以我在 Microsoft 应用商店中安装了 Ubuntu 应用程序,一切都很好。
但是,当我插入关闭或停止命令以关闭我的 ubuntu 时,我不断收到“系统尚未启动,系统作为 init 系统(PID 1)。无法操作”的错误信息。

我尝试通过此链接( https://blog.jayway.com/2017/04/19/running-docker-on-bash-on-windows/ )使用 docker,但在多次进入第 2 进程后我失败了。我不确定我的失败是因为安装了 docker 收费箱而不是普通收费箱。 (我的电脑只是 windows 10。不是 windows pro)

我想我必须尝试其他事情。如果你不介意我问,我该如何解决这个问题?

(还有一个。如果我只是单击右上角的“X”按钮,与使用“停止”或“关闭”命令关闭 Ubuntu 有什么不同吗?

谢谢

最佳答案

我发现这很有用:https://linuxhandbook.com/system-has-not-been-booted-with-systemd/
就我而言

# start docker using systemctl
sudo systemctl docker start
# returns:
#
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
基本建议是:
# check if your system is using `systemd` or `sysvinit`
ps -p 1 -o comm=
如果命令没有返回 systemd ,就我而言,WSL 上的 Ubuntu-20.04,命令返回 init ,然后使用命令模式
# start services using sysvinit
service docker start
这对我有用。

关于docker - (使用 WSL ubuntu 应用程序)系统尚未以系统作为 init 系统 (PID 1) 启动。无法操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52604068/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com