If Try to install Nix package Manager on Window Subsystem for Linux or WSL, it throws some cryptic error messages,
But There is work around for installing Nix On WSL Ubuntu or any other Distro. This Errors in WSL due to limited support to sandbox apis in WSL.
Steps to install Nix Package Manager On WSL
- Before running Nix Install script, we need to create nix config file in path
- Also make sure you create
- and add the following config options to the above file
sandbox = false use-sqlite-wal = false
Now Run the Nix Package Manager Install script:
curl https://nixos.org/nix/install | sh
And It will install successfully.