How to install HomeBrew on Mac with EPM under a User context

How to install HomeBrew on Mac with EPM under a User context

119
Created On 11/10/26 10:55 AM - Last Modified 11/10/26 16:00 PM


Objective


Homebrew or sometimes called just Brew, is a software distribution and installation utility for MacOS.
An issue was raised where Homebrew requires the installation and running to be as a local admin only. 
of course this is not a solution that maintains security level needed, hence the below script was generated to install Homebrew on the User context and not as admin/root

Homebrew can be found here https://brew.sh/, but please follow the instructions below.


Environment


10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7

Procedure


Open Root terminal session and paste the below scripting lines:

# install Brew Script
cd $HOME
 
echo "Home Address=$HOME ;"
 
gitVersionLog="$(git version)"
echo "Git Version= $gitVersionLog ;"
git clone https://github.com/Homebrew/brew.git
echo "git Clone status=Success;"
 
echo 'export PATH=$HOME/brew/bin:$PATH' > .bash_profile
echo "Create .bash_profile status=Success;"
 
echo 'export PATH=$HOME/brew/bin:$PATH' > .zshrc
echo "Create .zshrc status=Success;"
 
chown -R $USER brew .bash_profile .zshrc
echo "chown status=Success;"
 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001BXiCAM&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail