WSL: WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate
Version
Microsoft Windows [Version 10.0.22000.1335]
WSL Version
- WSL 2
- WSL 1
Kernel Version
5.15.79.1-microsoft-standard-WSL2
Distro Version
Release: 20.04
Other Software
Visual Studio Code (1.74.1)
Repro Steps
- PS C:\Users\user> wsl.exe --update
- Open ubuntu terminal
- Get the following output:
<3>WSL (4564) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin
➜ ~
I’m sorry for the poor reproduction steps, it just happened when I ran wsl.exe --update
Expected Behavior
Should not throw an error.
Actual Behavior
Getting <3>WSL (11) ERROR: UtilTranslatePathList:2671: Failed to translate F:\Users\Eliya\AppData\Local\Programs\Microsoft VS Code\bin every time I open a terminal
Diagnostic Logs
Let me know about any information I need to supply.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 13
- Comments: 62
I had a mystery error where WSL was terminating immediately on startup regardless of
wsl.exeflags, and updating to WSL through the Store fixed it, so now I’m stuck needing to fix the UtilTranslatePathList problem.The error (caused by SMB network drives being added to PATH thru Volatile Environment at login) gets resolved by appending this section to
wsl.conf:It’s in my PATH environnement variable defined on Windows. Maybe WSL should just ignore non existant path values ?
I had encountered a similar issue, but in my case, I was getting this error for all windows paths such as
C:\Windows\System32.Simply restarting the terminal did not work for me.
Restarting wsl seemed to fix it for me ( run
wsl --shutdownin PowerShell and then reopen your wsl terminal )First time trying to use wsl I ran into the same issues.
I checked my paths, removed missing folders from my path statements and still the issue existed. I shutdown wsl and tried it again, same thing…
I then installed ubuntu: wsl --install ubuntu set a password (prompted) and I was dropped to the shell prompt… hooray!
I ctrl-d to exit and then typed: wsl Same error…
I then set ubuntu as the default distro: wsl --set-default ubuntu Followed by trying it again: wsl Perfect! I was dropped the shell without any errors relating to path…
I suspect the default distro was causing the issue, errors with path appear to be a diversion.
Hope this helps somebody.
I met the same problem~ The root cause is D: does not exists when you started windows .
How to recur this issue:
solution: make sure all the PATH are available and then restart wsl.
$ wsl --shutdown $ wsl
In my case, this error was because of older broken distro still hanging around. You can see list of distro:
You can set default distro:
This worked for me.
I had what was likely this same issue just now, and the related potential resolutions I found didn’t seem to solve the issue:
I believe this started after upgrading to Windows 23H2, and happened on both 2.0.8 and 2.0.9. I tried uninstalling WSL entirely (deregistering the distro, removing the distro + WSL items from Windows Programs, removing the optional feature, rebooting, and then re-running
wsl --install) but it showed the same issue on a fresh install of Ubuntu, weirdly enough.I think this is the relevant part of dmesg when the issue presents itself (for C:), which seems to match with several other threads I’ve seen about mounting issues, but doesn’t seem to explain this specific issue:
Similarly, when trying to manually mount the drive, I get a “No such file or directory” error, even though
/mnt/cstill exists:Potential mitigation: Another issue suggested trying
in ~/.wslconfig on Windows, then rebooting WSL (
wsl --shutdownfirst) to debug the issue in more detail, which seems to have solved it for me for now, but I don’t know if there are other implications here (I can’t see this flag documented in Advanced settings configuration in WSL). 🤔cool, just the path environment variable in windows, just delete it in your windows.
~Got the same translation error
<3>WSL (53) ERROR: UtilTranslatePathList:2671: Failed to translate E:\SomePath\when trying to open a folder in WSL using VSCode.~EDIT: Actually the error was because
E:did not exist on that machine.@qdm12 Problem solved. Restarting the shell seems to do the trick. Thanks!
I have the same issue for a
substdrive. I suspect that this might be a way to reproduce the issue; create an entry into subst any path to a new drive name, reboot the device, and launch the WSL prompt.
I had <3>WSL (9) ERROR: UtilTranslatePathList:2671: Failed to translate F:\DATI\platform-tools I was fixing it set path | findstr platform-tools inside it find a … ;F:\DATI\platform-tools; … so check envinronment variables follow instruction on this link https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html delete the line error or correct it with the correct path in my situation my drive was E:
after correct it i fix that error/warning
wsl.conffile located in the/etc/directory in your WSL instance.wsl.conffile:[interop] appendWindowsPath=false
It works and here is a simple one-line command for adding that to the end of
wsl.conf!Did you close and re-open your shell/terminal? Such that the environment variables get reloaded. Otherwise try a reboot?
This looks to have fixed the problem for me:
docker-desktop strikes again…
Now after reboot the problem came back. But I managed to fix it by doing the following steps, maybe it will help someone else:
Set up wslconfig with
pwshand holdCTRL+SHIFTto start powershell in admin mode.wsl –shutdownto exit wsl and then typewslto start it againSteps 1-4 must be done after every reboot it seems, very annoying. I guess it could be put in a powershell command and place it on the desktop, maybe it could be made to run during startup or something.
This worked for me and my coworkers, thank you! I did have to reboot my laptop for this to take full effect (just wsl --shutdown wasn’t sufficient).
I have used WSL for some time. After a reboot today, I got these errors and I can no longer use my C disk
It seems that my C drive is no longer mounted.
mount -l | grep drvfsShows nothing.df -hDoes not show my C driveI have tried mounting it with
sudo mount -t drvfs C: /mnt/c/But it fails with:How can I solve this? My C drive works just fine in windows as usual.
Remove the environment variable that causing the problem. Check the user variable and system variable paths. Then reopen the terminal. If you use
appendWindowsPath=falsethen you will lose the ability to call the programs defined in system variable. In my case vscode’scodekeyword stopped working. So, I reverted that.This is exactly the issue I was facing.
so I added this in my powershell scripts:
seems to work now, but I don’t know how to revert the default, it might have broken something else
If your
/etc/wsl.confwas setted with:you will receive these errors:
When I commented lines above in
/etc/wsl.conf, all erros was fixed to me.My environment:
My
%userprofile%\.wslconfig:also need restart wsl
This problem still exists for both me and my colleague in 2.0.14.0
It looks like virtio9p has been disabled by default in the latest release: https://github.com/microsoft/WSL/releases/tag/2.0.11 - I guess that’s related to this! It seems like this issue is being worked on actively, in that case =)
I also tried this option but it didnt seem to do much for me.
Disabling the windows path thingy did reduce the number of errors but I still could not access c.
EDIT:
Now it seems to work again. I think adding the virtio9p=false option solved it!