Unable to install meshery on Ubuntu

Command: sudo curl -L https://git.io/meshery | PLATFORM=docker bash -
Error: curl: (23) Failure writing output to destination
Unable to get latest meshery install package. Set MESHERY_VERSION env var and re-run. For example: export MESHERY_VERSION=v0.1.6

Do I need to setup MESHERY_VERSION in some file or in Ubuntu env variables.

This might be because curl not being able to write to the particular temporary folder we download Meshery to.

Could you try uninstalling and installing curl again? If you have installed curl using something like snap, uninstall it and install the one from apt.

can you run the command in debug mode(as mentioned below) and share the o/p?

sudo curl -L https://git.io/meshery | PLATFORM=docker bash -x -

That was the problem indeed.
I restarted my pc changed the directory and it worked.
Thanks @navendu and @hexxdump