I tried with Ubuntu 18.04 on WSL 1 and it did not work, it was not possible to build from source.
Has anybody tried compiling on WSL2?
Tezos Stack Exchange is a question and answer site for users, experts, and developers of the Tezos blockchain project. It only takes a minute to sign up.
Sign up to join this communityI was able to make it work, you need to disable bubblewrap
which is used by opam but not supported in WSL. You can do so using the --disable-sandboxing
flag.
See https://github.com/ocaml/opam-repository/issues/12050#issuecomment-393478072
This comment by user jdsika includes all the steps needed to run Tezos on WSL2.
https://tezos.stackexchange.com/a/2801/1785
Note that Windows 10 version 2004 is needed. https://docs.microsoft.com/en-us/windows/whats-new/whats-new-windows-10-version-2004#windows-subsystem-for-linux-wsl