[Ethereum] Failed to check docker installation: exec: “docker”: executable file not found in $PATH

androidgo-ethereum

I am trying to create an Android Node for Ethereum using go implementation. I am following this link – https://github.com/Seedstars/go-ethereaum-android. During installation process I am running below command in ubuntu:

xgo --deps=https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 --remote=https://github.com/karalabe/go-ethereum --branch=andorid-path-fix --targets=android-16/arm --pkg=cmd/geth github.com/ethereum/go-ethereum

This command is showing following error:

Failed to check docker installation: exec: "docker": executable file not found in $PATH

I have tried some solutions but they are not working.Can someone help me with this error.

Best Answer

Go to your terminal and type: docker version

You may get this output:

The program 'docker' is currently not installed. You can install it by typing:
sudo apt install docker.io

In that case run that command and check if the error still appears.

If, after doing that, you get an error like this:

docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.26/containers/create: dial unix /var/run/docker.sock: connect: permission denied.

It can be fixed by adding your user to the docker group. Run this command and then completely log out of your account and log back in:

sudo usermod -a -G docker $USER
Related Topic