ubuntu - 无法在 WSL 上安装代码服务器。 "System has not been booted with systemd as init system (PID 1). Can' 进行操作。”

标签 ubuntu windows-subsystem-for-linux code-server

我按照说明在此处下载代码服务器:https://github.com/cdr/code-server/blob/v3.8.0/doc/install.md#debian-ubuntu
因为我在 Windows 上,所以我在 Windows Subsystem for Linux (WSL) 上使用 Ubuntu。
我已成功运行以下两行:

curl -fOL https://github.com/cdr/code-server/releases/download/v3.8.0/code-server_3.8.0_amd64.deb
sudo dpkg -i code-server_3.8.0_amd64.deb
但是,我对最后一行有疑问:
sudo systemctl enable --now code-server@$USER
我收到以下错误:
System has not been booted with systemd as init system (PID 1). Can't operate.
任何帮助将不胜感激 :)

最佳答案

错误消息表明 .deb旨在使用 WSL 不支持的 systemd(无需付出很多额外的努力)。
但是,似乎 code-server支持基于“独立”(非包)的安装。见 this section有关详细信息,请参阅安装文档。

关于ubuntu - 无法在 WSL 上安装代码服务器。 "System has not been booted with systemd as init system (PID 1). Can' 进行操作。”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65692974/

相关文章:

docker :无法识别的服务

ubuntu - Cmake 在 Ubuntu 20.04 上找不到 ZLIB

ubuntu - WebStorm 和 WSL : Failed to prepare environment: Trying to get WSL path from a different WSL distribution

visual-studio-code - Google Cloud shell .customize_environment 不起作用

ubuntu - 安装TensorFlow,Ubuntu上的cuda home在哪里?

c++ - 没有规则来制作目标 'Main.o' ,需要 'Main' 。停止

ubuntu - vgaswitcheroo 状态变化

java - 尝试使用控制台时出现意外 token 错误