今天在wsl执行systemctl报以下错, systemctl enable Docker Synchronizing state of docker.service with SysV service script with /li
今天在wsl执行systemctl报以下错,
systemctl enable Docker
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
Failed to reload daemon: Interactive authentication required.
Failed to reload daemon: Interactive authentication required.
Failed to enable unit: Interactive authentication required.
百度找了下解决办法,亲测可行。
在命令窗口执行wsl -l -v查看wsl的版本,如果不是2需要先更新wsl --update
2、在wls窗口 /etc下新建wsl.conf,内容:
[boot]
systemd=true
3、关闭wsl窗口,在命令窗口执行wsl --shutdown将wsl关闭
重新打开wsl窗口,现在systemctl命令就可以使用了。
来源地址:https://blog.csdn.net/m0_68736501/article/details/130289727
--结束END--
本文标题: WSL ubuntu使用systemctl命令报错,解决办法
本文链接: https://www.lsjlt.com/news/402212.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-21
2024-05-21
2024-05-21
2024-05-13
2024-05-13
2024-05-11
2024-05-11
2024-05-10
2024-05-07
2024-04-30
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0