Brew: command not found on Blufin

Brew was working fine yesterday on my Blufin. Yesterday I have poweroff laptop and today I have turned it on. Executing command: brew I get: “bash: brew: command not found”.

which brew returns: “/usr/bin/which: no brew in (/var/home/user1/.local/bin:/var/home/user1/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)”

It looks like brew got somehow corrupted on my Blufin. Any idea how to get it back?

rpm-ostree status

State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 2min 4s ago
Deployments:
● ostree-image-signed:docker://ghcr.io/ublue-os/bluefin:stable
Digest: sha256:308f2addc0874bb901680a8bf8b8a817cf9e102ac3e6d40dac7a0955f42ad1df
Version: 41.20250209.1 (2025-02-09T06:02:01Z)
Pinned: yes

There is someone else with the problem too.

It seems that brew just… didnt get evaluated for some reason??

Do you mind running eval /etc/profile.d/brew.sh and seeing if brew shows up on your PATH again? It should be properly installed, dunno what exactly is going on here

I executed above command and brew command still displays “command not found”.

I have now fixed the problem. I haven’t had anything super important installed in brew, so I could afford to do some “magic”.

  1. Move to brew directory.
    cd /var/home/linuxbrew
  2. Removed everything in this directory (DANGER: You can lose everything related to brew)
    rm -rf *
  3. Install brew with script:
    . /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  4. Close the terminal and open new terminal.
  5. Check if brew is working fine.
    brew doctor
    and it displays “Your system is ready to brew.”
  6. Install vifm terminal file manager application
    brew install vifm
    and application is installed successfully.
  7. Start a program
    vifm
    and application starts successfully.

Problem solved.

thanks, this :point_up: got it working again for me.

since found an easier way to do this :point_down: :

I have the same issue recently too. I will try one of these solutions and report back.

I tried this but when I open a new terminal and run brew doctor I get bash: brew: command not found. The script did run so I don’t know why this isn’t working. Any suggestions?

I followed the instructions at the end of the install script after the install completed and now it is working.