*nix fans, specially those who use macOS might be aware that the missing package manager, which Apple didn’t ship along for terminal package management lovers called “Homebrew”. Similarly a package manager for Linux called Linuxbrew as the name suggests is only for Linux and perhaps for macOS as well as both are somewhat *nixes(in my opinion).
Linuxbrew is the fork of Homebrew and you can use it on both Mac OS and Linux. Its usage is pretty much same as Homebrew. Since Linuxbrew will be installed in your home directory, it does not require root access. You can use Linuxbrew to install the packages which are not packaged to your the native distribution. It also allows to install most up-to-date applications and packages.
Linuxbrew needs the following dependencies in your Linux box.
- Ruby 1.8.6 or newer
- GCC 4.4 or newer
- Linux 2.6.16 or newer
- 64-bit x86 or 32-bit ARM (Raspberry Pi)
Linuxbrew as of now supports the 64 bit architecture.
Before installing Linuxbrew, make sure the aforementioned dependencies have been installed. If they are not installed already, run the following commands to install them on your Linux system.
- Can install software to your home directory and so does not require sudo
- Install software not packaged by your host distribution
- Install up-to-date versions of software when your host distribution is old
- Use the same package manager to manage your macOS, Linux, and Windows systems
Paste at a terminal prompt:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
The installation script installs Linuxbrew to
/home/linuxbrew/.linuxbrew using sudo if possible and in your home directory at
~/.linuxbrew otherwise. Linuxbrew does not use sudo after installation. Using
/home/linuxbrew/.linuxbrew allows the use of more binary packages (bottles) than installing in your personal home directory.
Follow the Next steps instructions to add Linuxbrew to your
PATH and to your bash shell profile script, either
~/.profile on Debian/Ubuntu or
~/.bash_profile on CentOS/Fedora/RedHat.
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv) test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv) test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
You’re done! Try installing a package:
brew install hello
If you’re using an older distribution of Linux, installing your first package will also install a recent version of
brew doctor to troubleshoot common issues.
Debian or Ubuntu
sudo apt-get install build-essential curl file git
Fedora, CentOS, or Red Hat
sudo yum groupinstall 'Development Tools' && sudo yum install curl file git
[via:- Linuxbrew official documentation & website]