reinstall without snap but still looking for it
Asked Answered
H

1

8

I deleted docker with:

sudo snap remove docker --purge

Then, I install docker following the doc guide (this)

All looks fine, but when I do:

$ docker -v
-bash: /snap/bin/docker: No such file or directory

It's like it still look for it in snap.

I tried:

$ sudo snap refresh --list

But doesn't work. Any idea?

Husbandry answered 4/1, 2022 at 10:7 Comment(3)
So you followed the guide. Performed all the steps including sudo docker run hello-world and everything looks fine. But when you do docker -v, you get an error?Delarosa
sudo docker run hello-world works, but docker -v doesn'tHusbandry
So root is OK, but the user has some weird settings. Probably an alias set in the shell. Try experimenting with snapcraft.io/docs/commands-and-aliases ... probably something about snap unalias.Delarosa
I
5

It seems that the problem is for alias. try this command whereis docker the output is some thing like this:

docker: /usr/bin/docker /etc/docker /usr/libexec/docker /usr/share/man/man1/docker.1.gz

now set new alias to docker.

alias docker='/usr/bin/docker'

try again the problem should be solved.

Infatuation answered 4/1, 2022 at 11:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.