0

Previously, I was needed to install homebrew. I opened the terminal and executed the command for it. However, it was taking to long and I was also short on the data limit. So, I interupted the execution in the terminal. When I restarted the system, I got following warning

/home/user/.profile: line 28 /bin/brew: No such file or directory
/home/user/.profile: line 29 /bin/brew: No such file or directory
/home/user/.profile: line 30 /bin/brew: No such file or directory
/home/user/.profile: line 31 /bin/brew: No such file or directory
/home/user/.profile: line 32 /bin/brew: No such file or directory

As a result the session will not be configured correctly.
You should fix the problem as soon as feasible

I don't know how can I fix this. Kindly suggest some.

When I executed grep -i mesg .profile I got nothing. For grep -i mesg .bash* I got .bash_history:grep -i mesg

The system is running normal as it was before while the warning pop up each time the system is turned on. However, my openweather gnome extension is not working.

EDIT: grep -i brew .profile gives

eval $(/bin/brew shellenv)
eval $(/bin/brew shellenv)
eval $(/bin/brew shellenv)
eval $(/bin/brew shellenv)
grep -i brew .bash*

gives

.bash_history:test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
.bash_history:test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
.bash_history:test -r ~/.profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
.bash_history:test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
.bash_history:test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenasasasasasasav)
.bash_history:test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
.bash_history:/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
.bash_history:/bin/bash -c "$(sudo -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
.bash_history:/bin/bash -c "$(sudo wget -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
.bash_history:/bin/bash -c "$(sudo wget  https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
.bash_history:brew instal bf
.bash_history:test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
.bash_history:test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
.bash_history:test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
.bash_history:echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
.bash_history:test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
.bash_history:test -r ~/.profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
.bash_history:/usr/local/bin/brew doctor
.bash_history:/usr/local/bin/brew
.bash_history:sh -c "$(curl -fsSL https://raw.gtihubusercontent.com/linuxbrew/install/master/install.sh)"
.bash_history:sh -c "$(curl -fsSL https://raw.gtihubusercontent.com/linuxbrew/install/master/install.sh)"
.bash_history:sh -c "$(curl -fsSL https://raw.githubusercontent.com/linuxbrew/install/master/install.sh)"
.bash_history:sh -c "$(curl -fsSL https://raw.githubusercontent.com/linuxbrew/install/master/install.sh)"
.bash_history:Command 'brew' not found, did you mean:
.bash_history:test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
.bash_history:echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
4
  • 1
    Please add additional info to the question not as a comment. – David Mar 13 at 8:17
  • 1
    #1 Why are you grepping for "mesg" instead of "brew"? #2 This is the consequence of incomplete installation. #3 grep for "brew"; after all, that is what it can't find... – RonJohn Mar 13 at 8:21
  • 1
    If references to "brew" in /home/user/.profile are the problem, and "brew" is referenced in /home/user/.profile then it seems the obvious first step is to comment out the four eval lines referencing "brew". – RonJohn Mar 13 at 9:27
  • @RonJohn, I'm new to ubuntu. Can you please tell me how exactly I can do that? Maybe add that as an answer if you think it can solve my problem – Lawhatre Mar 13 at 10:08
2

Edit your configuration file ~/.profile. Open it from within the text editor, or use a terminal command to open the editor with the file:

gedit ~/.profile

Then you could remove the lines that point to the not installed binary /bin/brew. Rather than removing, you may, for now, also inactivate them by placing a comment sign, # in front of the line. That allows you to easily re-activate these commands if needed.

That you have four times the same line eval $(/bin/brew shellenv) is probably a result of the wrong installation, so I would delete three occurrences, and leave only one commented out:

#eval $(/bin/brew shellenv)

Save file and and close the editor after having done these changes. If later on, you find you will never need that line again, you can still remove it completely.

3
  • This answer has solve my solved the problem. I have few questions though. #1 I don;t want brew at all so how can I wipe it completely off my system. #2 does snap comes along with brew?because my system has it when I checked using snap list – Lawhatre Mar 13 at 10:33
  • That is not how this site works. If your current problem is solved, then please "accept" the answer. Feel then free to ask new questions, one at the time. – vanadium Mar 13 at 10:43
  • askubuntu.com/q/1323231/1191829 here is the new thread – Lawhatre Mar 13 at 11:06

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.