cannot install centos:latest
python install.py rootfs_centos_latest.tar.xz [*] Probing the Linux subsystem... [!] Failed to get home directory of default user in WSL: [WinError 2] 。
- Do you have WSL installed already? You need a working installation first.
- Are you running the script inside WSL or from command prompt? You need to run it from command prompt, outside of WSL, while WSL is not running.
I'm getting the same error on my desktop trying to install Fedora 23. To answer your questions:
- Yes WSL is installed and working.
- Running the install script from command prompt outside of WSL directory and WSL is not running.
As a side note, I have used the distro switcher for a month or so on my laptop now and it has worked fine.
There are a few people reporting similar errors. I'll try to install a fresh insiders build and run the script on a few distributions, in order to see if anything is broken.
For the record, what build of Windows 10 are you using?
Version 1607, build 14393.693
Have you been able to resolve this issue? If not, I will be requiring more information, since I cannot reproduce it.
I have not been able to. I was planning to try reinstalling lxss since I don't have anything critical on it currently.
FWIW, I was able to get centos:latest installed as of today, 3/30/2017. However, I cannot restart services, I get the following error when trying to run systemctl: Failed to get D-Bus connection: Operation not permitted
I'm getting the same error when trying to py install.py nixos/nix. Any suggestions? I tried to run this immediately after alwsl (which completed successfully).
edit: With the following patch:
diff --git a/install.py b/install.py
index c65f563..61b7c39 100755
--- a/install.py
+++ b/install.py
@@ -9,6 +9,7 @@ import shutil
import tarfile
import os.path
import subprocess
+import traceback
from collections import OrderedDict
from ntfsea import ntfsea, lxattrb, stmode
@@ -73,6 +74,7 @@ try:
except BaseException as err:
print('%s[!]%s Failed to get home directory of default user in WSL: %s' % (Fore.RED, Fore.RESET, err))
+ traceback.print_exc()
sys.exit(-1)
# check squashfs prerequisites
I'm getting the following stack trace:
[*] Probing the Linux subsystem...
[!] Failed to get home directory of default user in WSL: [WinError 2] Nie można odnaleźć określonego pliku
Traceback (most recent call last):
File "install.py", line 59, in <module>
uid, gid, user = get_lxss_user()
File "C:\dnload\os-etc\wsl-distribution-switcher\utils.py", line 553, in get_lxss_user
uid, uid_type = winreg.QueryValueEx(lxreg, 'DefaultUid')
FileNotFoundError: [WinError 2] Nie można odnaleźć określonego pliku
edit 2: in the registry key HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss, I have only one key: State REG_DWORD 0x00000001 (1)
Hmm! Running the following command in Windows (cmd shell):
c:> lxrun /setdefaultuser someuser
seems to create the registry values! I'll try to run install.py again with this...
As to my intended docker repo (nixos/nix), after successful install.py, when trying to run "bash" I'm getting 0x80070002, so I assume it's the same as #20, meaning roughly that Alpine Linux doesn't currenly work on WSL.
Same error with base/archlinux.