asdf icon indicating copy to clipboard operation
asdf copied to clipboard

WSL2 Migration Guide v0.16

Open mtrivera opened this issue 11 months ago • 4 comments

How can we improve the documentation?

Cannot upgrade to v0.16. I have tried the following:

  • Turn off WSL, delete Ubuntu WSL, reinstall WSL
  • Delete Ubuntu WSL and reinstall
  • Upgrading Without Losing Data section

I still get this error message with the asdf info command:

NOTICE: You have tried to upgrade to asdf 0.16.0 or newer. Versions 0.16.0 is a complete rewrite of asdf in Go. This text is being printed by the older Bash implementation. If you are seeing this you have not migrated to asdf 0.16.0. Please follow the instructions on the upgrade guide to migrate to the new version.

Aside from this notice, this older Bash implementation works as it did in asdf version 0.15.0 and older.

Migration guide: https://asdf-vm.com/guide/upgrading-to-v0-16 asdf website: https://asdf-vm.com Source code: https://github.com/asdf-vm/asdf

Please add steps/commands for migration. It's vague and provides zero guidance on how to do the migration (ex. tar, cp, ex...).

mtrivera avatar Feb 19 '25 00:02 mtrivera

I would like to note I am having the same issue on ubuntu 24

Novapixel1010 avatar Feb 25 '25 06:02 Novapixel1010

How are y'all getting asdf on WSL & Ubuntu 24? Is this via apt?

andrecloutier avatar Mar 04 '25 15:03 andrecloutier

I'll pop in here to add I was also having some issues getting asdf installed on my WSL2 Debian image. The issue I had was a misunderstanding of how the binary worked, so it may be the same issue you had.

When it says "3. Copy the asdf binary into a directory on your $PATH." , make sure you're correctly copying over the existing binary with a command such as cp ~/.asdf ~/.asdf/bin/asdf. The binary you download from the repository is the pre-v0.16.0 version, which is the bash implementation of asdf. (I assume this is for compatibility and update reminders!) By copying the binary after make completes, you are changing that bash binary to the post-v0.16.0 go binary. This is where I mucked up and didn't copy the binary over, resulting in it using the old one instead of the new!

In addition, make sure to add both the shims directory as well as the actual asdf directory to your shell file (.bashrc for me). I have export PATH="$HOME/.asdf:${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH" in my file.

If everything is working correctly, asdf version will return the git commit hash with a -dev ending, as this is not a release but a build (Shown here): https://github.com/asdf-vm/asdf/blob/9f3b346e06244966375419a4940052e1b4ae501d/Makefile#L9

khiroti avatar Apr 12 '25 22:04 khiroti

The upgrade guide has been updated with more info. https://asdf-vm.com/guide/upgrading-to-v0-16.html. I don't use WSL so I can't help much here with specifics. I am updating the Github workflows to generate windows binaries. Should have a PR open soon.

Stratus3D avatar Jun 05 '25 00:06 Stratus3D

Update: I upgraded it recently. What I did was overwrite the asdf file with the one from the linux-x64-0.18.0 archive. Not sure if this is the correct method, but it seems to be working now.

mtrivera avatar Jun 22 '25 23:06 mtrivera