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
Lawhatre
  • 187

1 Answers1

4

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.

vanadium
  • 97,564