Windows Subsystem for Linux not recognizing JAVA_HOME Environmental Variable

As Biswapriyo suggested, you should use WSLENV. Open PowerShell. Then set JAVA_HOME to the path to your java installation. In your case, run setx JAVA_HOME “D:\Program Files\Java\jdk-11.0.1″ You should see a message that says “SUCCESS: Specified value was saved”. Then run setx WSLENV “JAVA_HOME/p”. You should see the success message again. Type ‘env’ into your … Read more

How to change default directory in Windows Subsystem for Linux

You should only change the startingDirectory for WSL (Ubuntu in this case) terminal sessions. Open settings.json via CTRL+SHIFT+, in Windows Terminal1 Make sure you are modifying startingDirectory under profiles/list/name: “Ubuntu” Example below (the slashes need to be escaped): …. { “guid”: “{2c4de342-xxx-xxx-xxx-2309a097f518}”, “hidden”: false, “name”: “Ubuntu”, “source”: “Windows.Terminal.Wsl”, “startingDirectory”: “\\\\wsl$\\Ubuntu\\home\\windows_username_in_lower_case” }, …. Documentation about startingDirectory … Read more

Enable Ingress controller on Docker Desktop with WLS2

Finally I found the way to fix. I have to deploy ingress Nginx by command: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v0.41.2/deploy/static/provider/cloud/deploy.yaml (Follows the instruction at https://kubernetes.github.io/ingress-nginx/deploy/#docker-for-mac. It works just fine for Docker for Windows) Now I can access http://ingress.local successfully.

pyenv install: 3.x BUILD FAILED (Ubuntu 20.04 using python-build 20180424)

These are the relevant parts of your log: In file included from /tmp/python-build.20210602162502.2268/Python-3.9.4/Modules/_cursesmodule.c:113: ./Include/py_curses.h:36:10: fatal error: curses.h: No such file or directory 36 | #include <curses.h> | ^~~~~~~~~~ compilation terminated. /tmp/python-build.20210602162502.2268/Python-3.9.4/Modules/_ctypes/_ctypes.c:107:10: fatal error: ffi.h: No such file or directory 107 | #include <ffi.h> | ^~~~~~~ compilation terminated. Python build finished successfully! The necessary bits to … Read more

WSL2 REST API Error due to WSL2 clock out of sync with Windows clock [closed]

In case anyone finds this via search and doesn’t notice that there is actually a solution listed in the question, you can fix WSL clock drift via. sudo hwclock -s If you just need to do it occasionally, this is a fine solution. If you need to do it more frequently, consider @piouson’s solution.

Execute Batch file in Windows Subsystem for Linux

Unfortunately at the moment you cannot do so without either using: cmd.exe /c foo.bat …or the following hack using binfmt: sudo sh -c “echo :WindowsBatch:E::bat::/init: > /proc/sys/fs/binfmt_misc/register” You could then just type: foo.bat The problems with this method are that you’d need to be root, run it each time you opened a bash window, probably … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)