通过遵循我是运行版本1还是版本2?,我验证了我的WSL是版本2。运行uname -a
输出"Linux桌面4.4.0-18362-Microsoft“
我想在microk8s上安装WSL2,这样就可以使用kubeflow了。关于如何通过启用microk8s启用sudo snap
命令来安装sytemD
,似乎有很多说明,但似乎没有一条指令适用于我的指令。
1.跟随 -> https://gist.github.com/djfdyuruiry/6720faa3f9fc59bfdf6284ee1f41f950
我被/tmp/install-sg.sh && rm /tmp/install-sg.sh
卡住了,运行它输出Error: Too many request
2. follwing -> https://wsl.dev/wsl2-microk8s/
我甚至不能运行WSL命令,当我这样做时,输出如下:
WSL
Wsman Shell commandLine, version 0.2.1
USAGE: wsl COMMAND [PARAMS...]
COMMANDS:
identify - WS-Identify
enum - WS-Enumerate
get - WS-Get
put - WS-Put
invoke - WS-Invoke
xclean - Delete all files generated by this tool set
xcred - Create or display credential file
xcert - Get server certificate (saved to .crt)
PARAMS specification is specific to a COMMAND.
Output will be saved to ./response.xml. If you want to run parallel
executions in the same directory, define RTFILEPREFIX in the environment.
Doing so may significantly increase files generated.
Requires: curl, xmllint, GNU core utilities.
Optional: xsltproc for output formatting, gpg for encrypted credential.
Optional: wget as alternate for curl when not available.
当我尝试运行apt install -yqq fontconfig daemonize
时,它会输出:
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
提前感谢!
发布于 2022-01-06 04:14:01
另一个北约今天提出的更老的问题。
这个问题至少有两个问题。
首先,Snap需要Systemd,而WSL此时不支持Systemd。相反,它使用自己的/init
作为PID1。
在容器/命名空间中启动Systemd有一些麻烦的解决方案。关于更深层次的潜水,请参见这个答案。
第二个问题是,运行wsl
是“错误的事情”。您原以为它会运行工具,但是它却运行WSMAN命令行工具。
通常,wsl
命令是从PowerShell或CMD运行的。在Windows环境中,运行wsl
和wsl.exe
是一回事。
但是,如果您是在WSL/Linux中,则必须显式地指定扩展,即wsl.exe
。
通常,Linux (WSMAN工具)并不是默认安装在Ubuntu中的,所以我猜您在某个时候确实安装了一个wsl
。
无论如何,运行wsl.exe
将为您提供您最初需要的工具。
https://askubuntu.com/questions/1311571
复制相似问题