Sample Header Ad - 728x90

Homebrew Installation Issue

0 votes
2 answers
942 views
Fairly new at Linux here and have a question about installing Homebrew. I'm using Centos7 and already updated all the required dependencies (cURL, etc.). When I run the Linux installation script from the Homebrew homepage, the process fails with the following error:
==> /usr/bin/sudo /bin/chown -R username:username /home/linuxbrew/.linuxbrew/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (7/7), done.
remote: Total 16 (delta 7), reused 7 (delta 7), pack-reused 9
Unpacking objects: 100% (16/16), 3.98 KiB | 94.00 KiB/s, done.
From https://github.com/Homebrew/brew 
   560f5717a..31758eaa0  master     -> origin/master
HEAD is now at 31758eaa0 Merge pull request #14027 from MikeMcQuaid/devcontainer
/home/linuxbrew/.linuxbrew/bin/brew: line 26: !": event not found
/home/linuxbrew/.linuxbrew/bin/brew: line 24: HOMEBREW_NO_ENV_FILTERING: unbound variable
Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force --quiet
[usernamek@centos ~]$
Has anyone seen this before, or might be able to point me in the right direction? I couldn't find any info pertaining to this particular installation failure anywhere else the I looked during my research. Per comment, adding lines from
/home/linuxbrew/.linuxbrew/bin/brew
:
#!/bin/bash    #line 1
#lines 21-28:
# Fail fast with concise message when requesting unfiltered environment.
# This is basically odisabled so can be removed at any major release afterwards
# and definitely if this is still here in 2023.
if [ -n "${HOMEBREW_NO_ENV_FILTERING}" ]
then
  echo "Error: HOMEBREW_NO_ENV_FILTERING was deprecated for over a year and has now been removed (because it breaks many things)!" >&2
  exit 1
fi
Edit: Here is the exact install command I ran, from the Homebrew homepage:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) "
Thanks!
Asked by Mrschwifty (1 rep)
Oct 27, 2022, 09:04 PM
Last activity: Apr 4, 2023, 12:39 AM