首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在Windows 11上的Ubuntu上安装k9s

在Windows 11上的Ubuntu上安装k9s
EN

Ask Ubuntu用户
提问于 2022-05-09 13:00:14
回答 1查看 5.2K关注 0票数 1

我想在Windows 11上的Ubuntu上安装k9s。

当我试图安装它时,我会得到一个错误,即该管理单元已关闭:

代码语言:javascript
运行
复制
➜  ~ sudo snap install k9s
error: cannot communicate with server: Post http://localhost/v2/snaps/k9s: dial unix /run/snapd.socket: connect: no such file or directory

当我启动管理单元时,我得到一个新错误:

代码语言:javascript
运行
复制
➜  ~ systemctl start snapd.service
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

有人知道我该怎么做吗?

EN

回答 1

Ask Ubuntu用户

发布于 2022-08-22 16:06:45

这是WSL2的一个问题,您可以通过运行以下命令来修复它:

代码语言:javascript
运行
复制
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

snap version

来源:https://github.com/microsoft/WSL/issues/5126#issuecomment-653715201

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1407547

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档