7

When I restart my PC I get this error:

Error found when loading /home/ray/.profile:

/home/ray/.profile: line 28: /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.

As far as I can understand it's the installation of homebrew that is causing this issue because it says /bin/brew in the second line and I wasn't getting this issue on boot-up before I installed homebrew. After some research I found that homebrew isn't really for Ubuntu, just MacOS. If I remember correctly on how I installed homebrew I did it this way:

sudo apt-get install build-essential curl file git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
echo 'export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin/:$PATH"' >>~/.bashrc
echo 'export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH"' >>~/.bashrc
echo 'export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"' >>~/.bashrc
source  ~/.bashrc

Any help is appreciated. I actually don't mind uninstalling homebrew if that's what's necessary, in fact that's what I would like to do once I resolve this error message on bootup.

Pablo Bianchi
  • 17,371
RayGar
  • 71

2 Answers2

10

I had also the problem when I tried installing Homebrew and terminated it halfway. Then whenever I start ubuntu, this error pops up. Then I tried a method to fix it and it worked correctly.

The Solution is

Simply delete the line containing eval $(/bin/brew shellenv) from /home/ray/.profile file.

-1

In my case was same error.

I removed the line containing eval $(/bin/brew shellenv) from the /home/$USER/.profile file and the error went away.

Where $USER is the profile username.

Pablo Bianchi
  • 17,371