Brew not installed on some containers

Hi, we’ve seen a lot of builds fail with:

bash: line 1: brew: command not found

Most of the time it works, but it looks like there are some containers that don’t have the correct environment setup on them.

Anything we can do about this?

1 Like

Having the same issues here. We have a pretty standard circle.yml file:

- brew install geckodriver
branch: staging
- “[[ ! -s “$(git rev-parse --git-dir)/shallow” ]] || git fetch --unshallow”
- git push OUR REPO $CIRCLE_SHA1:refs/heads/master --force
- heroku run rake db:migrate --app PRODUCTION_APP

uname -a gives me: Linux box1283.localdomain 3.13.0-91-generic #138-Ubuntu SMP Fri Jun 24 17:00:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I managed to manually install homebrew and reference it by sticking all the brew-related logic on the same line in circle.yml. See below.

        - ruby -e "$(curl -fsSL"  </dev/null && PATH="$HOME/.linuxbrew/bin:$PATH" && brew install {your_dependency}

We submitted a support ticket and the response was that some containers made it out of staging without brew installed. The problem went away after that.

I’d recommend submitting a ticket if you still see this, so they can fix the containers.