3

I have the app minikube in /usr/local/bin/minikube. When I do minikube version with the whole path, I get:

$ /usr/local/bin/minikube version
minikube version: v0.28.2

When I do minikube version without the path, I get:

$ minikube version
bash: /snap/bin/minikube: No such file or directory

The /usr/local/bin is included in PATH:

$ echo $PATH
//usr/local/bin:/home/eric/.local/bin:/home/eric/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Why isn't minikube found without the full path, and what does /snap/bin have to do with anything? Any help much appreciated!

Added info as per comment below from @mpr: Some time ago, I installed minikube with snap like this:

sudo snap install minikube

It was later removed with

sudo snap remove minikube

Much later, having forgotten about the snap install, I installed it from the minikube site with curl:

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.28.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

2 Answers 2

5

Just figured it out: There was a minikube directory under ~/snap, probably left over from a previous install. Fixed the problem doing:

$ rm -rf ~/snap/minikube

This snap-business is a bit annoying...

4
  • 1
    For future readers it may be interesting to know more about what exactly you installed. It looks like you had a Snap version of minikube, but perhaps also one compiled from scratch and installed to /usr/local? Snaps are a new application/package management type tool for Ubuntu. Files related to snaps go in /snap at the system level and ~/snap for each user.
    – mpr
    Jul 31, 2018 at 19:55
  • That's interesting, it looks like the snap removal tool really didn't completely remove things.
    – mpr
    Aug 1, 2018 at 13:23
  • Yup. Must be a problem with my system or a bug. Can't find any bug reports on this, though. Can't reproduce it either, nor find anything in the logs...
    – ElToro1966
    Aug 1, 2018 at 15:24
  • 1
    This solved similar problem with removing rustup (aka cargo)
    – Eran
    Jun 28, 2023 at 6:10
1

Starting some experimentation with Kubernetes on a newly installed Ubuntu 18.04 system I also initially used snap to install minikube, encountered errors, and then decided to remove the snap.

sudo snap install minikube
sudo snap remove minikube

I installed minikube a second time with curl.

curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.28.2/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

I also encountered this error :

/snap/bin/minikube: No such file or directory 

This was all performed in a single terminal window.

I did not discover any residual snap files in any of the locations mentioned in the comments above. The error went away when I killed and started a new terminal window.

The error is NOT reproducable now that I have successfully installed and run minikube on this system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .