How to install brew on linux

Содержание
  1. Homebrew Documentation
  2. Features
  3. Install
  4. Requirements
  5. Debian or Ubuntu
  6. Fedora, CentOS, or Red Hat
  7. 32-bit x86
  8. Homebrew Documentation
  9. macOS Requirements
  10. Git Remote Mirroring
  11. Alternative Installs
  12. Linux or Windows 10 Subsystem for Linux
  13. Untar anywhere
  14. Multiple installations
  15. Uninstallation
  16. How to install Brew on Ubuntu 20.04 LTS Linux
  17. HomeBrew installation on Ubuntu 20.04 Linux
  18. 1. Open a command terminal
  19. 2. Install Git on Ubuntu 20.04
  20. 3. Run Homebrew installation script
  21. 4. Add Homebrew to your PATH
  22. 5. Check Brew is working fine
  23. 6. Uninstall it from Linux
  24. Как установить Homebrew на Ubuntu 20.04 LTS
  25. Как установить Homebrew на Ubuntu 20.04 LTS
  26. Установите Homebrew на Ubuntu 20.04 LTS Focal Fossa
  27. Шаг 1. Сначала убедитесь, что все ваши системные пакеты обновлены, выполнив следующие apt команды в терминале.
  28. Шаг 2. Установка зависимостей Brew.
  29. Шаг 3. Установка Homebrew на Ubuntu 20.04.
  30. Шаг 4. Тестирование Homebrew в Linux.
  31. How To Install and Use LinuxBrew on a Linux VPS
  32. Intro
  33. Why Use LinuxBrew ?
  34. The Gist of LinuxBrew
  35. Preparing for LinuxBrew — Debian/Ubuntu
  36. Preparing for LinuxBrew — CentOS/RedHat
  37. Installing LinuxBrew
  38. Step 1 — Clone LinuxBrew
  39. Step 2 — Update environment variables
  40. Step 3 — Test installation
  41. Installing Packages with LinuxBrew
  42. Which packages are available?
  43. Install a package
  44. Adding Existing HomeBrew Repositories
  45. Updating TAPs and Packages
  46. Creating Custom/Private TAPs (Repositories)
  47. Formulas in local files
  48. Formulas in GitHub repositories
  49. More information

Homebrew Documentation

The Homebrew package manager may be used on Linux and Windows Subsystem for Linux (WSL). Homebrew was formerly referred to as Linuxbrew when running on Linux or WSL. It can be installed in your home directory, in which case it does not use sudo. Homebrew does not use any libraries provided by your host system, except glibc and gcc if they are new enough. Homebrew can install its own current versions of glibc and gcc for older distributions of Linux.

Features, installation instructions and requirements are described below. Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is explained in the documentation.

Features

  • 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

Install

Instructions for a supported install of Homebrew on Linux are on the homepage.

The installation script installs Homebrew to /home/linuxbrew/.linuxbrew using sudo if possible and in your home directory at

/.linuxbrew otherwise. Homebrew 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.

The prefix /home/linuxbrew/.linuxbrew was chosen so that users without admin access can ask an admin to create a linuxbrew role account and still benefit from precompiled binaries. If you do not yourself have admin privileges, consider asking your admin staff to create a linuxbrew role account for you with home directory /home/linuxbrew .

Follow the Next steps instructions to add Homebrew to your PATH and to your bash shell profile script, either

/.profile on Debian/Ubuntu or

/.bash_profile on CentOS/Fedora/Red Hat.

You’re done! Try installing a package:

If you’re using an older distribution of Linux, installing your first package will also install a recent version of glibc and gcc. Use brew doctor to troubleshoot common issues.

Requirements

  • GCC 4.7.0 or newer
  • Linux 2.6.32 or newer
  • Glibc 2.13 or newer
  • 64-bit x86_64 CPU

Paste at a terminal prompt:

Debian or Ubuntu

Fedora, CentOS, or Red Hat

Homebrew can run on 32-bit ARM (Raspberry Pi and others) and 64-bit ARM (AArch64), but no binary packages (bottles) are available. Support for ARM is on a best-effort basis. Pull requests are welcome to improve the experience on ARM platforms.

You may need to install your own Ruby using your system package manager, a PPA, or rbenv/ruby-build as we no longer distribute a Homebrew Portable Ruby for ARM.

32-bit x86

Homebrew does not currently support 32-bit x86 platforms. It would be possible for Homebrew to work on 32-bit x86 platforms with some effort. An interested and dedicated person could maintain a fork of Homebrew to develop support for 32-bit x86.

Читайте также:  Windows 10 кавычки вводятся только парами

Источник

Homebrew Documentation

Instructions for a supported install of Homebrew are on the homepage.

This script installs Homebrew to its preferred prefix ( /usr/local for macOS Intel, /opt/homebrew for Apple Silicon and /home/linuxbrew/.linuxbrew for Linux) so that you don’t need sudo when you brew install . It is a careful script; it can be run even if you have stuff installed in the preferred prefix already. It tells you exactly what it will do before it does it too. You have to confirm everything it will do before it starts.

macOS Requirements

  • A 64-bit Intel CPU or Apple Silicon CPU 1
  • macOS Mojave (10.14) (or higher) 2
  • Command Line Tools (CLT) for Xcode: xcode-select —install , developer.apple.com/downloads or Xcode3
  • The Bourne-again shell for installation (i.e. bash ) 4

Git Remote Mirroring

You can set HOMEBREW_BREW_GIT_REMOTE and/or HOMEBREW_CORE_GIT_REMOTE in your shell environment to use geolocalized Git mirrors to speed up Homebrew’s installation with this script and, after installation, brew update .

The default Git remote will be used if the corresponding environment variable is unset.

Alternative Installs

Linux or Windows 10 Subsystem for Linux

Untar anywhere

Just extract (or git clone ) Homebrew wherever you want. Just avoid:

  • Directories with names that contain spaces. Homebrew itself can handle spaces, but many build scripts cannot.
  • /tmp subdirectories because Homebrew gets upset.
  • /sw and /opt/local because build scripts get confused when Homebrew is there instead of Fink or MacPorts, respectively.

However do yourself a favour and use the installer to install to the default prefix. Some things may not build when installed elsewhere. One of the reasons Homebrew just works relative to the competition is because we recommend installing here. Pick another prefix at your peril!

Multiple installations

Create a Homebrew installation wherever you extract the tarball. Whichever brew command is called is where the packages will be installed. You can use this as you see fit, e.g. a system set of libs in the default prefix and tweaked formulae for development in

Uninstallation

Uninstallation is documented in the FAQ.

1 For 32-bit or PPC support see Tigerbrew.

2 10.14 or higher is recommended. 10.9–10.13 are supported on a best-effort basis. For 10.4-10.6 see Tigerbrew.

3 Most formulae require a compiler. A handful require a full Xcode installation. You can install Xcode, the CLT, or both; Homebrew supports all three configurations. Downloading Xcode may require an Apple Developer account on older versions of Mac OS X. Sign up for free here.

Источник

How to install Brew on Ubuntu 20.04 LTS Linux

Homebrew is one of the popular package managers for Mac OS X but can be installed on Linux as well to download and install various packages. Homebrew Cask extends Homebrew with support for quick installation of applications like Google Chrome, VLC, and more.

On Linux, it is known as Linuxbrew. On Ubuntu Linux, we already have an APT package manager with a wide range of applications and other packages to install, then what is the need for Linuxbrew?

What is the difference between APT and Homebrew or Linuxbrew?

1. Both HomeBrew and APT’s main goal is the same that is the installation of various packages using the command line. However, on one hand, APT is the native and well-integrated manager of Debian-based systems including Ubuntu, HomerBrew is a third-party package manager that the user can install manually.

2. Difference in the command syntax, if a user is already familiar with the brew command line on macOS and new to Ubuntu then he or she can use it to install programs without learning new command hooks. However, if you are a user of Ubuntu or Debian, then for sure you don’t need to install it.

3. Homebrew maintains a separate user-owned directory, thus no need to run it with sudo to install applications.

4. Where apt-get is generally designed to overwrite previous versions; in the brew, it compiles packages and saves them according to its version in subdirectories. This means we can have multiple versions of a package on the same machine at the same time, however, only one of them will get symlinked into your main Homebrew hierarchy.

Читайте также:  Php ������ ��� ������

5. APT cleanup or uninstall older packages automatically with the update, whereas, in Homebrew, a user needs to run the brew cleanup command.

HomeBrew installation on Ubuntu 20.04 Linux

1. Open a command terminal

Run terminal and then first, issue an update command-

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…

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-

4. Add Homebrew to your PATH

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

5. Check Brew is working fine

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

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

6. Uninstall it from Linux

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

Источник

Как установить Homebrew на Ubuntu 20.04 LTS

Как установить Homebrew на Ubuntu 20.04 LTS

В этом руководстве мы покажем вам, как установить и настроить Homebrew в Ubuntu 20.04 LTS. Для тех из вас, кто не знал, Homebrew — это программное обеспечение для управления пакетами для установки различного программного обеспечения на macOS, однако мы также можем использовать этот Brew с открытым исходным кодом в операционных системах Windows WSL и Linux, таких как Debian, Ubuntu, Linux Mint, Fedora, CentOS, RedHat и другие.

В этой статье предполагается, что у вас есть хотя бы базовые знания Linux, вы знаете, как использовать оболочку, и, что наиболее важно, вы размещаете свой сайт на собственном VPS. Установка довольно проста и предполагает, что вы работаете с учетной записью root, в противном случае вам может потребоваться добавить sudo к командам для получения привилегий root. Я покажу вам пошаговую установку Homebrew на сервере Ubuntu 20.04 (Focal Fossa).

Установите Homebrew на Ubuntu 20.04 LTS Focal Fossa

Шаг 1. Сначала убедитесь, что все ваши системные пакеты обновлены, выполнив следующие apt команды в терминале.

Шаг 2. Установка зависимостей Brew.

Установите зависимости Homebrew, если у вас есть доступ sudo:

Шаг 3. Установка Homebrew на Ubuntu 20.04.

Теперь мы можем начать установку, используя следующую команду:

После завершения установки настало время сделать программу доступной в системе. Для этого выполните следующие команды:

Шаг 4. Тестирование Homebrew в Linux.

Вы можете попробовать установить пакет с Brew. Если вы хотите установить пакет, вам просто нужно выполнить следующую команду:

Например, вы хотите установить пакет python, просто введите следующую команду:

Поздравления! Вы успешно установили Homebrew . Благодарим за использование этого руководства по установке Homebrew в системе Ubuntu 20.04 LTS Focal Fossa. Для получения дополнительной помощи или полезной информации мы рекомендуем вам посетить официальный сайт Homebrew .

Источник

How To Install and Use LinuxBrew on a Linux VPS

By Assaf Gordon

Published on February 14, 2014

Intro

LinuxBrew is a Linux-fork of the popular Mac OS X HomeBrew package manager.

LinuxBrew is package-management-software, which enables installing packages from source, on top on the system’s default package management (e.g. “apt/deb” in Debian/Ubuntu and “yum/rpm” in CentOS/RedHat).

Why Use LinuxBrew ?

HomeBrew was originally developed for Mac OS X (which does not have a standard open-source package-management system). It superceded package-managements such as MacPorts and Fink. LinuxBrew is homebrew ported to Linux.

Most Linux distributions have a good package management system (e.g. “apt/deb” in Debian/Ubuntu and “yum/rpm” in CentOS/RedHat), however

  • Packages in the standard repositories are often older than the latest available versions, and
  • Many open-source packages are not available in the standard repositories (e.g. common bioinformatics tools).

LinuxBrew provides a repository of software installation recipes (packages are installed from source and compiled on the local machine) to complement the packages from the distribution’s standard repository.

LinuxBrew provides an easy method to build your own repositories (i.e. list of open-source packages tailored to your needs).

Читайте также:  Windows search text content

LinuxBrew installs software in user-specified directory (not system-wide), and does not require sudo access.

LinuxBrew (and HomeBrew) integrates very well with GitHub, enabling sharing of installation recipes easily.

Especially with DigitalOcean, which (at the time of this writing) does not provide sharable Droplet Images (with custom-configured installed software), a LinuxBrew repository can provide a quick method to install specific packages and versions on a standard Linux machine.

The Gist of LinuxBrew

Simply put, LinuxBrew takes care of downloading the tar.gz file and running ./configure && make && make install for you (or whichever commands are needed to install the package).

A LinuxBrew Formula is a Ruby script which defines where to find the tar.gz file, how to build the package, and how to install it.

A formula file can be as simple as hmmer.rb (a bioinformatics tool):

Or as complicated as emacs.rb.

Once a formula file is properly defined, installing the package is simply a matter of running:

Preparing for LinuxBrew — Debian/Ubuntu

For Debian/Ubuntu-based systems, run the following commands:

Preparing for LinuxBrew — CentOS/RedHat

For RedHat/CentOS-based systems, run the following commands:

Installing LinuxBrew

Installing LinuxBrew is simply a matter of cloning the LinuxBrew Repository.

Step 1 — Clone LinuxBrew

To keep things tidy, clone LinuxBrew into a hidden directory in the user’s home directory:

But any other directory would work just as well.

Step 2 — Update environment variables

The next step is to add LinuxBrew to the user’s environment variables.

Add the following lines to the end of the user’s

NOTE: If you installed LinuxBrew to a different directory, change the path in LINUXBREWHOME above.

Step 3 — Test installation

To ensure those changes take effect, log-out and log-in again. The shell should then use these new settings.

To test these new settings, try:

Installing Packages with LinuxBrew

Which packages are available?

Type brew search to see the list of all available packages (all the packages that the current installation of LinuxBrew knows about – see below about adding repositories).

Type brew search WORD to see all the packages (called Formulas in HomeBrew jargon) which contain WORD. Example:

Install a package

To install a package, run brew install PACKAGE .

LinuxBrew’s usefulness is apparent: While Ubuntu has jq in the latest repositories, its version is old (1.2). Debian Stable and Testing don’t have jq package at all. LinuxBrew’s version is the most recent one (1.3). Addionally, LinuxBrew installs the program to a path which will not conflict with the system’s default location.

Adding Existing HomeBrew Repositories

HomeBrew/LinuxBrew repositories are called TAPS. These are simply GitHub repositories containing Ruby scripts (‘Formulas’). The HomeBrew Githab User has several common repositories.

Example: adding the homebrew-science repository (containing many useful open-source scientific programs) and the HomeBrew-Games repository:

List available taps:

Install any package from those repositories:

Updating TAPs and Packages

To download any updates to Formulas, run:

To upgrade packages (if updates are available), run:

Creating Custom/Private TAPs (Repositories)

A HomeBrew TAP/Repository is simply a collection of Formulas – Ruby scripts stored in local files or in GitHub repositories.

Formulas in local files

To install a formula from a local file, run:

This is useful when creating (and debugging) a new formula.

Formulas in GitHub repositories

To create a custom TAP repository in github, Create a new GitHub repository (in your user’s github account) and name it homebrew-NAME . It must start with ‘homebrew-’ to work as a HomeBrew/LinuxBrew tap. NAME can be any name you want.

GitHub user agordon has a HomeBrew repository named gordon, the full URL is: https://github.com/agordon/homebrew-gordon.

To use this repository (“tap it”):

NOTES

brew tap used the username agordon and the repository suffix gordon (suffix of ‘homebrew-gordon’) and deduced the github URL to access.

Formulas in custom repostiries can conflict with formulas in the official HomeBrew repositories. That is perfectly normal. See below on how to install such packages.

To install non-conflicting packages from custom repositories, run:

To install packages from specific taps, run:

More information

NOTE: When reading HomeBrew-related information, keep in mind that HomeBrew was developed for Mac OS X.

LinuxBrew (the linux-port of HomeBrew) have many commonalities with HomeBrew, but also some linux-specific differences.

Источник

Оцените статью