WSL-Distribution-Switcher icon indicating copy to clipboard operation
WSL-Distribution-Switcher copied to clipboard

Fedora installed, but I can't use dnf

Open calebmeyer opened this issue 7 years ago • 0 comments
trafficstars

First off, thanks for these awesome scripts!

I went to install fedora today from the windows store, found out everyone's been waiting for like a year. I'm on windows version 15063, and I can't grab the fall creator's update because this is my work laptop.

I successfully installed python 3 on windows, and then successfully downloaded the tar for fedora:latest. I ran python install.py fedora:latest and it installed successfully (as far as I can tell).

I attempted to run dnf install git and it failed (Error: This command has to be run under the root user.). I renamed the post install hook, and that also failed:

$ python .\install.py fedora:latest
[*] Probing the Linux subsystem...
[*] Default user is caleb at /home/caleb.
[*] Reading /etc/{passwd,shadow,group,gshadow} entries for root and caleb...
[*] Beginning extraction...
[*] Backing up current rootfs to rootfs_fedora_latest...
[*] Switching to new rootfs...
[*] Writing entries of root and caleb to /etc/{passwd,shadow,group,gshadow}...
[*] Switching default user to root...
[*] Running post-install hook all...
[*] Detecting operating system...
Unsupported operating system.
[!] Failed to run hook in WSL: Command '['cmd', '/C', 'C:\\windows\\System32\\bash.exe', '-c', 'REGULARUSER="caleb" WINVER="15063" /root/hook_postinstall_all.sh']' returned non-zero exit status 1.
[*] Switching default user back to caleb...

I followed the troubleshooting. I had no sudo, and su -l did authentication failed. I changed the default user to root, and logged back in. However, there's no passwd in /usr/local/bin or /usr/bin or /bin (or anywhere on the path). I tried installing it with dnf, and it hangs the terminal so badly that Ctrl-C does nothing. I switched it back to my user and dnf works as expected, but I don't have rights to use it.

Any ideas where to go from here? I tried ubuntu and it works as expected. I tried fedora:25 and it exhibits the same problems.

calebmeyer avatar Feb 10 '18 03:02 calebmeyer