Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k9s command not found after snap install #2128

Closed
s-bernhardt opened this issue Jun 13, 2023 · 13 comments
Closed

k9s command not found after snap install #2128

s-bernhardt opened this issue Jun 13, 2023 · 13 comments
Labels
duplicate This issue or pull request already exists

Comments

@s-bernhardt
Copy link

s-bernhardt commented Jun 13, 2023




Describe the bug
A simple snap install does not work as expected. The k9s command was not found after installation.

To Reproduce
Steps to reproduce the behavior:

  1. Login to ubuntu as regular user (sudoer)
  2. Install k9s via snap sudo snap install k9s
  3. Run command k9s
  4. See error
ubuntu@k9s-node:~$ k9s
Command 'k9s' not found, did you mean:
  command 'kas' from deb kas (2.6.3-2)
Try: sudo apt install <deb name>
  1. Binary is available at /snap/k9s/current/bin/k9s

Expected behavior
k9s would start by using the current KUBECONFIG

Versions (please complete the following information):

  • OS: [Ubuntu Server 22.04.2 LTS]
  • K9s: [0.27]
  • K8s: [1.26.5]

Additional context
It is reproducible on any other Ubuntu Server 22.04 instances
Workaround: alias k9s=/snap/k9s/current/bin/k9s

@slimus
Copy link
Collaborator

slimus commented Jun 13, 2023

Hello @s-bernhardt-atos! Thanks for your detailed issue. I still work on snap package here. I'm going to close this issue, but you can add details to the existing issue.

@slimus slimus closed this as completed Jun 13, 2023
@slimus slimus added the duplicate This issue or pull request already exists label Jun 13, 2023
@koolvn
Copy link

koolvn commented Oct 18, 2023

Well actually you can make a soft link to snap's bin directory which is in PATH

sudo ln -s /snap/k9s/current/bin/k9s /snap/bin/

Now k9s works from any terminal instance on your machine

@kmgrime
Copy link

kmgrime commented Nov 16, 2023

Well actually you can make a soft link to snap's bin directory which is in PATH

sudo ln -s /snap/k9s/current/bin/k9s /snap/bin/

Now k9s works from any terminal instance on your machine

Thanks for this, was needed after install on Fedora 38 via Snap.

@ECiurleo
Copy link
Contributor

This fixed the issue for me installing k9s on Ubuntu (via snap store and via CLI)

@raymundovr
Copy link

raymundovr commented Jan 31, 2024

Unfortunately there's one more issue on Ubuntu 22.04 ARM:

$ sudo ln -s /snap/k9s/current/bin/k9s /snap/bin/
$ k9s
bash: /snap/bin/k9s: cannot execute binary file: Exec format error

I've installed k9s by downloading the k9s_linux_arm64.deb file from the releases page and using apt install

@Afaq-DevOps
Copy link

Well actually you can make a soft link to snap's bin directory which is in PATH

sudo ln -s /snap/k9s/current/bin/k9s /snap/bin/

Now k9s works from any terminal instance on your machine

Thanks for this, was needed after install on Fedora 38 via Snap.

its work for me

@clbarrett
Copy link

Well actually you can make a soft link to snap's bin directory which is in PATH

sudo ln -s /snap/k9s/current/bin/k9s /snap/bin/

Now k9s works from any terminal instance on your machine

Thanks for this, was needed after install on Fedora 38 via Snap.

its work for me

This workaround worked for me.
The underlying issue is still here as of 4/4/2024 though.

@ECiurleo
Copy link
Contributor

ECiurleo commented Apr 4, 2024

#2350

I submitted the fix a while ago but it's not been pushed up to the snap store. Until it is people installing via snap will get the issue.

@clbarrett
Copy link

Aah excellent. Thank you ECiurleo. And in the meantime, that command works to fix it so we have a workaround. Awesome!

@raikrahul
Copy link

is there a fix yet?

@kmgrime
Copy link

kmgrime commented May 21, 2024

is there a fix yet?

Well actually you can make a soft link to snap's bin directory which is in PATH

sudo ln -s /snap/k9s/current/bin/k9s /snap/bin/

Now k9s works from any terminal instance on your machine

Thanks for this, was needed after install on Fedora 38 via Snap.

Seems like its still in a PR, aka not fixed.

@mlliarm
Copy link

mlliarm commented May 31, 2024

Still not fixed on Ubuntu 22.04.4, but the workaround of the soft link works great, so thanks !

@ECiurleo
Copy link
Contributor

ECiurleo commented May 31, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

10 participants