11

I need Linuxbrew for a certain application, and how can I acquire Linuxbrew?

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Human
  • 1,198
  • 4
  • 15
  • 35

2 Answers2

6

It is not in the Raspbian package repository, you can verify this with:

sudo apt-cache search linuxbrew.

This is not surprising as this is a non standard way of installing packages on Linux (It is a port of Homebrew from Mac OS).

You can install from source:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)" 
PATH="$HOME/.linuxbrew/bin:$PATH"

Edit your

~/.bash_profile

and add

~/.linuxbrew/bin

to your PATH:

echo 'export PATH="$HOME/.linuxbrew/bin:$PATH"' >>~/.bash_profile

reload your .bash_profile

source ~/.bash_profile

full instructions are available here.

Ghanima
  • 15,855
  • 15
  • 61
  • 119
Steve Robillard
  • 34,687
  • 17
  • 103
  • 109
  • There are some dependencies in those instructions that you'll want to address before running that ruby script. Also, since you're enabling binaries installed with user privileges, it would be better to have the Linuxbrew path at the end of your PATH: export PATH="$PATH:$HOME/.linuxbrew/bin" – scruss Feb 20 '17 at 22:38
  • @scruss agreed, but those instructions come right from the linuxbrew site. I would add that the better method would be to avoid a third party repo and curling raw code. for security reasons. It would be better to find the package or files needed in one of the standard repos or build it from source. This would at least limit the amount of code that needs to be run and maintained outside the normal apt process. Also, the instructions fom Linuxbrew also modify the PATH via .bash_profile rather than the more standard .bashrc. – Steve Robillard Feb 20 '17 at 22:44
2

It is but you won't be able to use it as they move to the a ruby version for 64 bits...

Install it via linuxbrew-wrapper:

sudo apt-get install linuxbrew-wrapper

Execute brew and you'll get

brew

    ========================================================================
For the convenience of using linuxbrew it is recommended to update the
following environment variables after installing linuxbrew.

  PATH, MANPATH, INFOPATH 

Set HOMEBREW_BOTTLE_DOMAIN environment variable if you prefer some
homebrew mirror as your upstream.

(example: /usr/share/doc/linuxbrew-wrapper/examples/profile)
========================================================================
==> This script will install:
/home/pi/.linuxbrew/bin/brew
/home/pi/.linuxbrew/Library/...
/home/pi/.linuxbrew/share/doc/homebrew
/home/pi/.linuxbrew/share/man/man1/brew.1
/home/pi/.linuxbrew/share/zsh/site-functions/_brew
/home/pi/.linuxbrew/etc/bash_completion.d/brew
/home/pi/.cache/Homebrew/

Press RETURN to continue or any other key to abort

After pressing return linux brew will be downloaded and installed.

Anyway, you'll get next error:

==> Pouring portable-ruby-2.3.3_2.armv6_linux.bottle.tar.gz
Error: Failed to install vendor ruby.
Error: Failed to install vendor Ruby.
Fabian
  • 1,260
  • 1
  • 10
  • 19
Pau Chorro
  • 121
  • 3