2

I'm learning C and would like to use VS Code with WSL as my programming environment.

I'm using a Lenovo ThinkPad L460 running Windows 10.

I was able to install VS Code, but got the following error 0x8007000e when I tried installing WSL in PowerShell using wsl --install:

A error was encountered during installation, but installation may continue. Component: 'Ubuntu' Error Code: 0x8007000e
The requested operation is successful. Changes will not be effective until the system is rebooted.

I'm not sure what this error means. This thread says it's due to insufficient storage. I have enough (110GB) free disk space available, so I thought maybe it's complaining about my RAM (4GB)? I'd be grateful if someone could shed some light on this, as I'm a total noob and don't want to break anything.

I've looked into Visual Studio, but I'll be writing many small programs and don't want to create a new project for each. The other option I've come across is VirtualBox, but I've never used VM before and don't want to break anything.


EDIT: Running wsl -l -v in command prompt returns:

enter image description here


EDIT: After following the manual install steps given here, I get WslRegisterDistribution failed with error: 0x80370102:

WslRegisterDistribution failed with error: 0x80370102

My system information for Hyper-V Requirements shows:

VM Monitor Mode Extensions: Yes
Hyper-V - Virtualization Enabled in Firmware: No
Second Level Address Translation Extensions: Yes
Hyper-V - Data Execution Protection: Yes

UPDATE: Switching to WSL 1 almost worked. I was able to install Ubuntu 22.04 LTS, but got a weirdly named command prompt called "root@DESKTOP-SAM07NG" upon completion and was not asked to create a login (as shown in Step 6).

I then installed the Remote Development extension pack for VS Code as required here.

However, I was unable to open a remote folder from the WSL terminal according to Step 3:

enter image description here

The suggested workaround can be found here.

Some users had success with upgrading their gzip. I'm not sure how to check my version, (running root@DESKTOP-5AM07NG:~# gzip --version just returns -bash: /usr/bin/gzip: cannot execute binary file: Exec format error.), but I did see gzip in the list returned by apt list --upgradable. So I tried updating it with ~# sudo apt install gzip.

Retrying Step 3, I get:

enter image description here

...and VS Code launches, but no folder is opened:

enter image description here

12
  • 1
    "space requirements" is talking about your physical storage not the amount of system memory your device has. You should edit your question to indicate the version of Windows 10. This might be helpful
    – Ramhound
    Commented Oct 16, 2022 at 7:36
  • 1
    You should be installing Ubuntu from the Microsoft Store, not PowerShell, if Windows 10 is up to date. Check also your disk free space.
    – harrymc
    Commented Oct 16, 2022 at 10:26
  • Thanks @Ramhound, I have 110GB of disk space remaining.
    – user173972
    Commented Oct 16, 2022 at 11:55
  • @Thanks harrymc, I used PowerShell per the instructions on Microsoft's website.
    – user173972
    Commented Oct 16, 2022 at 11:57
  • @user173972 So just for clarity, a wsl --install? At this point, does wsl -l -v show anything? (Again, remember to edit into the question since the results may be difficult to read in a comment) -- Thanks! Commented Oct 16, 2022 at 12:45

1 Answer 1

0

It looks like the Core i5-6300U in your ThinkPad L460 should support the virtualization needed for WSL2, but it hasn't been enabled in the BIOS. Your System Information results back that up.

Try these steps from Lenovo for enabling virtualization, summarized here:

  • Enter the BIOS by rebooting the computer and holding F1 at power-on.

  • Find the Security tab in the BIOS

  • Enable the Intel Virtualization Technology (may be called VT-x)

  • Save the changed with F10 and reboot

  • Check systeminfo.exe again and see if your results have changed

Then try enabling the Virtual Machine Platform option again.

After that try installing Ubuntu. At this point, you can probably do this most easily by running ubuntu.exe install --ui=none. This will skip the graphical install and just ask for a username and password.

If you continue to experience problems, leave me a comment, but also continue to update your question with the latest info.

5
  • thank you so much for walking me through this, I really appreciate your help and patience. I ended up switching to WSL 1 last night before seeing your answer this morning (I'm in NZ), but encountered a problem with gzip. I've added an update to my post, but would totally understand if you don't have the time to look into it as it's a different problem from the one in my original post.
    – user173972
    Commented Oct 17, 2022 at 0:49
  • @user173972 The gzip issue should be resolved by a sudo apt update && sudo apt upgrade -y. See this answer for details, and let me know if that's still not working for some reason. The root issue is one that you really should take care of, though. What's your wsl -l -v show now -- Ubuntu or Ubuntu-22.04? Commented Oct 17, 2022 at 2:16
  • Thanks for getting back, it's showing NAME: Ubuntu-22.04 STATE: Running VERSION: 2. I followed your instructions to enable VTT and VT-d in BIOS, ran wsl --set-default-version 2 in PowerShell and uninstalled Ubuntu and reinstalled it through the MS store. This time I got the orange graphical install and I could even sign up :) I still can't open folders in VS Code from the WSL command line.
    – user173972
    Commented Oct 17, 2022 at 3:35
  • @user173972 It's not still giving you gzip issues when attempting to open a folder in VScode, though, is it? Commented Oct 17, 2022 at 4:10
  • No, thankfully. And the folder wasn't opening up because dingus me was typing code instead of code .. It all works as it should now. Thank you for all your help :)
    – user173972
    Commented Oct 17, 2022 at 5:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .