Reputation: 643
when i try to run git-all-secrets i got Dockerfile: command not found and this is the command include correct information
here is an example of the issue
root@momo22:/home/momo/git-all-secrets# docker run -it abhartiya/tools_gitallsecrets -token=9a8b60a10cf683f238e05 -org=bugcrwod
Command 'docker' is available in '/snap/bin/docker'
The command could not be located because '/snap/bin' is not included in the PATH environment variable.
docker: command not found
root@momo22:/home/momo/git-all-secrets#
Upvotes: 45
Views: 135508
Reputation: 89
~/.bash_profile
export PATH=$PATH:/snap/bin
and save the changessource ~/.bash_profile
you can open ~/.bash_profile
with vi
or gedit
Upvotes: 0
Reputation: 804
~/.bashrc
with nano or vim => vim ~/.bashrc
export PATH=$PATH:/snap/bin
at the end of the fileif ~/.bashrc
doesn't exist:
~/.bashrc
file and open it => touch ~/.bashrc && vim ~/.bashrc
PATH=$PATH:/snap/bin
if you don't want to logout or reboot run these commands:
sudo su ${USER}
bash
Upvotes: 0
Reputation: 952
If you come here and are just on Ubuntu
rather than docker
and you have just installed snapd
without logging out/in again, log out then in again - you don't need to modify any files.
Upvotes: 1
Reputation: 395
you can add the path into .bashrc file
$ echo 'export PATH=$PATH:/snap/bin' >> ~/.bashrc
open new terminal or execute this command
$ source ~/.bashrc
Upvotes: 27
Reputation: 221
To fix this issue do the following:
/etc/environment
.Add /snap/bin
to the end of the PATH Variable and concatenate using the :
character.
Example lets assume we had the PATH variable in the file was: Path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
After your update this will look like: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin
source /etc/environment
Upvotes: 20
Reputation: 1105
Run the command export PATH=$PATH:/snap/bin
Edit /etc/environment
and add /snap/bin
in the list then restart your system.
answer for similar error with same fix
More info on /etc/enviroment
Upvotes: 96