HomeBrew installation on Ubuntu 20.04 Linux

945G...fRid
9 Jun 2024
25


1. Open a command terminal

Run terminal and then first, issue an update command-

sudo apt update


sudo apt-get install build-essential

2. Install Git on Ubuntu 20.04

For setting up LinuxBrew on Ubuntu 20.04 or 18.04, we need to install GIT on our system, here is the command for that…

sudo apt install git -y

3. Run Homebrew installation script

The official website of Brew offers a pre-build script to install download and install Homebrew using the command line on any available Linux such as CentOS, RHEL, OpenSUSE, Linux Mint, Kali, MX Linux, POP!OS and others.
Here is the command, just run it-

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

4. Add Homebrew to your PATH

To run the brew command after installation, we need to add it to our system path…

eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

5. Check Brew is working fine

To ensure everything is working correctly to use brew, we can run its command-

brew doctor

It may give the warning to install GCC and to remove that simply install it using brew-

brew install gcc

6. Uninstall it from Linux

If you want to remove Homebrew, then here is the brew uninstallation script, also available on GitHub.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Source:
https://www.how2shout.com/linux/how-to-install-brew-ubuntu-20-04-lts-linux/

Write & Read to Earn with BULB

Learn More

Enjoy this blog? Subscribe to 666

0 Comments

B
No comments yet.
Most relevant comments are displayed, so some may have been filtered out.