I recently bought a new PC, and I'm trying to install nim in WSL, since the default version with Ubuntu isn't current.
The first issue I had, is choosnim said I had no C compiler. I installed clang, but choosenim still said there was no compiler, although simply calling "clang" showed it was there. So I installed gcc, just to move on, and choosenim could then install nim as root.
But I could not access it from the default non-root user (I got access denied, I believe), so I moved .choosenim and .nimble folders to the default user's home, and ran a chown on them. There was a hard path to the root home in ".choosenim/current" (or something, I restarted the console and deleted everything, so I'm not sure anymore), so I changed that path to my default user home.
Then I got an error that nim executable could not be located, although when I ran "ls" it was exactly there where the message said it should be, and the owner was also correct.
I then gave up, and deleted everything, and just ran "curl https://nim-lang.org/choosenim/init.sh -sSf | sh" in my default user's home. And then I got:
choosenim-init: Downloading choosenim-0.6.0_linux_amd64 curl: (23) Failed writing body (0 != 16360)
I tried again, even in a different directory, but it still failed, so I came here. I've got lots of space in the new PC, so it's not a disk-full problem.
Hi
Congratulations on the new PC!
Not sure I can help with the choosenim install issues, I would guess with all the 'fun' you have been having trying to install in different ways, there may be some residual install left over of something...
On Ubuntu, the easiest way to get the Nim dependencies needed (ie compiler etc) is to run:
sudo apt install build-essential openssl
If you want to try a different approach - I have a bash shell script on my GitHib repo here: https://github.com/wiremoons/nim-misc/blob/master/nim-install.sh
I use it with GitHub Actions for building and testing Nim code in Ubuntu 20.10 - so I works ok, and will currently install Nim 1.2.4 pre compiled binary version, as available from the Nim Downloads page (see: https://nim-lang.org/install_unix.html).
You can always just use the script as a reference to look at the steps used, and pick what you need, and type them yourself in to a WSL terminal prompt....
Hope that helps get you up and running with Nim :)
Simon