我按照说明在此处下载代码服务器: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/