8

I just realized that I keep getting message 404:: command not found every time I open terminal. I don't remember what I installed right before getting this message:

enter image description here

I can't find it in any of bash's startup files:

$ grep 404 -H ~/.bashrc ~/.profile ~/.bash_profile ~/.bash.login \
              ~/.bash_aliases /etc/bash.bashrc /etc/profile  \
             /etc/profile.d/* /etc/environment 2> /dev/null
$

I also ran PS4='${BASH_SOURCE}:${LINENO} ' bash -lxe, you can find the full output can be found here.

  • Oh wow. Something really strange is going on here. Do you have any idea what you might have changed to cause this? Were you editing any configuration files or something? @muru this is an odd one. – terdon Nov 14 '16 at 16:49
  • 3
    What's in your /etc/bash_completion.d/docker-compose ? – derobert Nov 14 '16 at 16:57
  • Also, I just realized you ran ps $$ after running bash -lxe. Could you open a new terminal, run ps $$ and just confirm that the output contains bash? – terdon Nov 14 '16 at 16:59
18

This part of your bash -lxe output:

///usr/share/bash-completion/bash_completion:1981 . /etc/bash_completion.d/docker-compose
////etc/bash_completion.d/docker-compose:1 404: Not Found
////etc/bash.bashrc:57 '[' -x /usr/lib/command-not-found ']'
////etc/bash.bashrc:58 /usr/lib/command-not-found -- 404:
404:: command not found
////etc/bash.bashrc:59 return 127

reads to me that you have a /etc/bash_completion.d/docker-compose that starts off with 404:. I'm guessing at some point you tried to download that configuration file from somewhere and instead wound up saving an HTTP error message.

That file should be plain text; you can use your preferred text editor on it (you should need to use sudo/sudoedit/etc. to modify it).

PS: I suggest in the future you review downloaded files before installing them—not only to notice error messages, but also to see what they do (especially important if you don't fully trust the site its coming from, or if its served over HTTP instead of HTTPS), and if there is any customization needed for your particular setup.

  • 1
    Thanks a lot I just looked inside /etc/bash_completion.d/docker- compose and there is only a line 404 not found. I just removed it. – Petra Barus Nov 15 '16 at 2:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.