Ubuntu: bash: script/bash_completion_dog: No such file or directory



Question:

When I open my terminal, I get this message. I tried to correct my .bashrc file but could not find anything related to this error message. How do I resolve this?

As suggested by terdon, I tried the following:

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

I also tried searching through my /etc directory using grep, but it did not work.


Solution:1

I have found the answer. As it turns out, there was an application called sheepdog causing the problem. I first removed the application and then entered into the directory /etc/bash_completion.d and removed the directory as follows:

sudo rm -rf sheepdog

and restarted the terminal. It worked perfectly.


Solution:2

There are various files that are read when you start a new shell (e.g. open a new terminal window). Which ones depend on the type of shell you are running, but the error could be caused by various files. The simplest way to check is to search all of them for the name of the script that is causing the error:

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

The command above will search for bash_completion_dog in all of the various files your shell might be reading. If that returns nothing, then the file in question is being called by something which is in turn being called by one of those files. Therefore, if the above returns nothing, edit your question to add that you tried this and we can take it from there. Also try searching through the files in /etc:

grep "bash_completion_dog" /etc/* 2>/dev/null  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »