Coder Social home page Coder Social logo

Comments (6)

sighupper avatar sighupper commented on June 16, 2024

This is not limited to Windows. Is also happening on Mac:


test@test $ curl -fsSLO https://github.com/kubernetes-sigs/krew/releases/download/v0.4.4/krew-darwin_arm64.tar.gz
+ curl -fsSLO https://github.com/kubernetes-sigs/krew/releases/download/v0.4.4/krew-darwin_arm64.tar.gz
test@test $ tar zxvf krew-darwin_arm64.tar.gz
+ tar zxvf krew-darwin_arm64.tar.gz
x ./LICENSE
x ./krew-darwin_arm64
test@test $./krew-darwin_arm64
+ ./krew-darwin_arm64
krew is the kubectl plugin manager.
You can invoke krew through kubectl: "kubectl krew [command]..."

Usage:
  kubectl krew [command]

Available Commands:
  help        Help about any command
  index       Manage custom plugin indexes
  info        Show information about an available plugin
  install     Install kubectl plugins
  list        List installed kubectl plugins
  search      Discover kubectl plugins
  uninstall   Uninstall plugins
  update      Update the local copy of the plugin index
  upgrade     Upgrade installed plugins to newer versions
  version     Show krew version and diagnostics

Flags:
  -h, --help      help for krew
  -v, --v Level   number for the log level verbosity

Use "kubectl krew [command] --help" for more information about a command.
test@test $./krew-darwin_arm64 install
+ ./krew-darwin_arm64 install
This version of Krew is not supported anymore. Please manually migrate:
1. Uninstall Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/uninstall/
2. Install latest Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/install/
3. Install the plugins you used
krew home outdated

from krew.

ahmetb avatar ahmetb commented on June 16, 2024

@sighupper you're manually invoking ./krew-darwin_arm64 install –that's not what you think it does. The command at https://krew.sigs.k8s.io/docs/user-guide/setup/install/ specifically uses Krew to install Krew. So please stick to the command (which does ./"${KREW}" install krew).

If it still fails even by copy pasting the exact command, please provide the full output (and ideally run the last command with -v=7 flag).

Ideally we should remove this code path though so it stops causing issues.

from krew.

sighupper avatar sighupper commented on June 16, 2024

@ahmetb , thank you for your response.

I am following https://krew.sigs.k8s.io/docs/user-guide/setup/install/

Here is running the commands as suggested in the above install guide:

test@test $  set -x; cd "$(mktemp -d)" &&
>   OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
>   ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&
>   KREW="krew-${OS}_${ARCH}" &&
>   curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&
>   tar zxvf "${KREW}.tar.gz" &&
>   ./"${KREW}" install krew
++ mktemp -d
+ cd /var/folders/1k/b0c0b49j7x11n5rfwzcyx_580000gp/T/tmp.g9td4oMuGg
++ uname
++ tr '[:upper:]' '[:lower:]'
+ OS=darwin
++ uname -m
++ sed -e s/x86_64/amd64/ -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/'
+ ARCH=arm64
+ KREW=krew-darwin_arm64
+ curl -fsSLO https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-darwin_arm64.tar.gz
+ tar zxvf krew-darwin_arm64.tar.gz
x ./LICENSE
x ./krew-darwin_arm64
+ ./krew-darwin_arm64 install krew
This version of Krew is not supported anymore. Please manually migrate:
1. Uninstall Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/uninstall/
2. Install latest Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/install/
3. Install the plugins you used
krew home outdated
test@test $

and here is running the same commands but adding -v=7 flag:


test@test $  set -x; cd "$(mktemp -d)" &&   OS="$(uname | tr '[:upper:]' '[:lower:]')" &&   ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&   KREW="krew-${OS}_${ARCH}" &&   curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" &&   tar zxvf "${KREW}.tar.gz" &&   ./"${KREW}" install krew -v=7
+ set -x
++ mktemp -d
+ cd /var/folders/1k/b0c0b49j7x11n5rfwzcyx_580000gp/T/tmp.HM1C7QeLbQ
++ uname
++ tr '[:upper:]' '[:lower:]'
+ OS=darwin
++ uname -m
++ sed -e s/x86_64/amd64/ -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/'
+ ARCH=arm64
+ KREW=krew-darwin_arm64
+ curl -fsSLO https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-darwin_arm64.tar.gz
+ tar zxvf krew-darwin_arm64.tar.gz
x ./LICENSE
x ./krew-darwin_arm64
+ ./krew-darwin_arm64 install krew -v=7
I0515 11:49:34.376854    4993 root.go:238] Ensure creating dir: "/Users/mdavidson/.krew"
I0515 11:49:34.377023    4993 root.go:238] Ensure creating dir: "/Users/mdavidson/.krew/store"
I0515 11:49:34.377028    4993 root.go:238] Ensure creating dir: "/Users/mdavidson/.krew/bin"
I0515 11:49:34.377033    4993 root.go:238] Ensure creating dir: "/Users/mdavidson/.krew/index"
I0515 11:49:34.377037    4993 root.go:238] Ensure creating dir: "/Users/mdavidson/.krew/receipts"
I0515 11:49:34.377131    4993 root.go:132] skipping upgrade check
This version of Krew is not supported anymore. Please manually migrate:
1. Uninstall Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/uninstall/
2. Install latest Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/install/
3. Install the plugins you used
F0515 11:49:34.377209    4993 root.go:80] krew home outdated
sigs.k8s.io/krew/cmd/krew/cmd.preRun
        /home/runner/work/krew/krew/cmd/krew/cmd/root.go:153
github.com/spf13/cobra.(*Command).execute
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:915
github.com/spf13/cobra.(*Command).ExecuteC
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068
github.com/spf13/cobra.(*Command).Execute
        /home/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
sigs.k8s.io/krew/cmd/krew/cmd.Execute
        /home/runner/work/krew/krew/cmd/krew/cmd/root.go:78
main.main
        /home/runner/work/krew/krew/cmd/krew/main.go:25
runtime.main
        /opt/hostedtoolcache/go/1.20.5/x64/src/runtime/proc.go:250
runtime.goexit
        /opt/hostedtoolcache/go/1.20.5/x64/src/runtime/asm_arm64.s:1172

from krew.

chriskim06 avatar chriskim06 commented on June 16, 2024

to get this error you would need to have a plugin installed without any receipts https://github.com/kubernetes-sigs/krew/blob/master/internal/receiptsmigration/migration.go#L36-L39. on a fresh install though there would be no plugins installed yet (since this runs before the actual install of krew). since !(hasInstalledPlugins && hasNoReceipts) is false in your case you must have no receipts but an installed plugin somehow. could you show the output of ls for both /Users/mdavidson/.krew/bin and /Users/mdavidson/.krew/receipts?

from krew.

sighupper avatar sighupper commented on June 16, 2024

So, I am using an ansible playbook for set up and it is throwing:

Install krew plugin manager for kubectl...  failed | msg: non-zero return code | stderr: This version of Krew is not supported anymore. Please manually migrate:
1. Uninstall Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/uninstall/
2. Install latest Krew: https://krew.sigs.k8s.io/docs/user-guide/setup/install/
3. Install the plugins you used
krew home outdated

This even fails if mv /Users/mdavidson/.krew/bin{,.bak} and mv /Users/mdavidson/.krew/receipts{,.bak}.

That said, if I even mv those , then the set up guide steps work when doing them "manually".

I will work on my playbook and circle back here if I have need any help.

Thank you!

from krew.

boardtc avatar boardtc commented on June 16, 2024

@chriskim06 I have nothing installed other than in my OP. Have you tried an install on a clean virtual machine? It does not work :-(

from krew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.