Skip to content

Instantly share code, notes, and snippets.

@fardjad
Last active September 17, 2024 19:24
Show Gist options
  • Save fardjad/114ebf50a0dd031418bb63b3b134db51 to your computer and use it in GitHub Desktop.
Save fardjad/114ebf50a0dd031418bb63b3b134db51 to your computer and use it in GitHub Desktop.
[How to Install Homebrew on Manjaro] Steps required to install homebrew on Manjaro Linux #linux #manjaro #homebrew

How to Install Homebrew on Manjaro

Steps

  1. Install base-devel

     pacman -Syu # CAUTION: this updates the whole system
     pacman -S base-devel
    
  2. Run the installer script

     sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
    
  3. Set brew environment variables

     [ -d /home/linuxbrew/.linuxbrew ] && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
     
     # You most likely want to add the above line to your shell startup file as well.
    
  4. Make brew doctor happy

     brew doctor
     
     # In case it complains about the linked directory
     mkdir -p /home/linuxbrew/.linuxbrew/var/homebrew/linked
     chown -R $(whoami) /home/linuxbrew/.linuxbrew/var/homebrew/linked
     
     # Ignore the warning about python being symlinked to python3. This is the default behavior in ArchLinux/Manjaro and chaning the symlink is dangerous.
    
  5. Vendor-install ruby

     brew vendor-install ruby
    
  6. Install gcc (as recommended by the installer script)

     brew install gcc
    
@OsaidM
Copy link

OsaidM commented Jan 4, 2021

thax man i really appreciate sharing this on git-hub you saved me lots of time, wish you the best.

@DamarkusHarris
Copy link

Quick question. So I created a virtual environment and wanted to know how I can add number 3 environement variable to my start up file. I am using arch linux distro.

@fardjad
Copy link
Author

fardjad commented Feb 24, 2021

Quick question. So I created a virtual environment and wanted to know how I can add number 3 environement variable to my start up file. I am using arch linux distro.

Not sure what you mean by number 3, but that depends on your shell. For bash, you can add it to your bash startup files.

@chintu4
Copy link

chintu4 commented Jul 4, 2021

for second statement I got
curl :Could not resolve host:raw.githubusercontent.com

@has12zen
Copy link

for step 3 add

 [ -d /home/linuxbrew/.linuxbrew ] && eval (/home/linuxbrew/.linuxbrew/bin/brew shellenv)

in config.fish in fish folder

@ploorp
Copy link

ploorp commented May 2, 2022

awesome, thanks dude

@vtvz
Copy link

vtvz commented Jun 3, 2022

If you in new version on Manjaro get an error, try adding the libxcrypt-compat package. It helped in my case

@sohailahmad07
Copy link

Hi, add the following line to your .zshrc file to set the environment variable permanently
Make sure the path the brew is correct

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment