Ask questionsKrew install fails on Ubuntu WSL (Windows Subsystem for Linux)

# (
>   set -x; cd "$(mktemp -d)" &&
>   curl -fsSLO "{tar.gz,yaml}" &&
>   tar zxvf krew.tar.gz &&
>   ./krew-"$(uname | tr '[:upper:]' '[:lower:]')_amd64" install \
>     --manifest=krew.yaml --archive=krew.tar.gz
> )
++ mktemp -d
+ cd /tmp/tmp.y04kz5whCK
+ curl -fsSLO '{tar.gz,yaml}'
+ tar zxvf krew.tar.gz
++ uname
++ tr '[:upper:]' '[:lower:]'
+ ./krew-linux_amd64 install --manifest=krew.yaml --archive=krew.tar.gz
Installing plugin: krew
W0311 13:32:17.764882     418 install.go:132] failed to install plugin "krew": failed to dowload and move during installation: could not rename file from "/tmp/krew-temp-move308169657" to "/root/.krew/store/krew/dc2f2e1ec8a0acb6f3e23580d4a8b38c44823e948c40342e13ff6e8e12edb15a": rename /tmp/krew-temp-move308169657 /root/.krew/store/krew/dc2f2e1ec8a0acb6f3e23580d4a8b38c44823e948c40342e13ff6e8e12edb15a: permission denied
F0311 13:32:17.768004     418 root.go:52] failed to install some plugins: [krew]

Tried as root and non-root. Both fails with same error.


Answer questions StianOvrevage

Great job figuring this out!

I was not able to get automatic mounting of /home to work. There was no wsl.conf so maybe there are some differences between our setups.

I did however just mount /mnt/c/linuxhome temporarily for the install and then moved krew into /krew. Hopefully this works without breaking too many of krews expectations about how things should look.


Related questions

No questions were found.
Github User Rank List