Меню Рубрики

Mac os brew install

Homebrew

Недостающий менеджер пакетов для macOS

Установка Homebrew

Вставьте эту строку в терминал.

Перед выполнением скрипт объяснит, что он собирается сделать. Другие варианты установки можно найти здесь.

Что делает Homebrew?

Homebrew устанавливает нужные вам пакеты, не предоставляемые Apple.

Homebrew устанавливает программы в их собственные директории и создает символьную ссылку на них в /usr/local .

Homebrew не устанавливает файлы за пределами своей директории. Вы можете установить Homebrew в любую директорию.

Создавать свои пакеты для Homebrew просто.

Под капотом — ruby и git . Так что можно спокойно редактировать пакеты, а в случае чего сможете легко откатить свои изменения.

Спецификация пакета это просто скрипт на Ruby:

Homebrew дополняет macOS. Устанавливайте гемы, используя gem , а их зависимости через brew .

«Чтобы установить, перетащите эту иконку. » больше не требуется. brew cask устанавливает приложения, шрифты, плагины для macOS и другое программное обеспечение с закрытым исходным кодом.

Создать cask также легко, как создать formula .

Источник

How to Install Homebrew on Mac

Advanced Mac users may appreciate using the Homebrew package manager, which greatly simplifies the process of installing command line software and tools on a Mac.

For example, if you want to easily install favorite command line tools on a Mac like cask, htop, wget, nmap, tree, irssi, links, colordiff, or virtually any other familiar unix command line utility, you can do so with a simple command. Homebrew downloads and builds the package for you.

This is obviously aimed at more technically savvy Mac users who spend a lot of time at the command line. While there’s no particular issue for novice users installing Homebrew on their Mac, the odds of novices finding it useful are slim, unless they intend to embark on learning the command line environment. Contrast that to power users who practically live in a terminal environment, whether longtime Mac users or migrating to the platform from the Windows or Linux world, who will immediately see the value of Homebrew.

Requirements for Installing Homebrew on Mac OS

prerequisites to installing Homebrew on a Mac include the following:

  • A Mac running Mac OS X 10.10 or later, though earlier versions are sort of supported
  • Command Line Tools must be installed on the Mac (either independently or through Xcode)
  • Knowledge of the command line and using bash or zsh

Assuming you’re interested in installing Homebrew and meet those requirements, then the rest is equally straight forward.

How to Install Homebrew on Mac OS

The simplest way to install Homebrew is through ruby and curl, accomplished with a single command. This approach is the same for installing Homebrew in all supported versions of Mac OS and Mac OS X.

  1. Open the “Terminal” application, found in /Applications/Utilities/
  2. Enter the following command into a single line of the terminal:

For MacOS Catalina, macOS Mojave, and MacOS Big Sur:
/bin/bash -c «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)»

For macOS High Sierra, Sierra, El Capitan, and earlier:
/usr/bin/ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)»

Installation of Homebrew will take a while depending on the speed of your Mac and internet connection, as each necessary package is downloaded and installed by the script.

When complete, you will see an “Installation successful!” message.

Now you’re ready to install software packages through Homebrew, or you can read the help documentation with the following command:

Installing Software Packages through Homebrew on Mac

Installing packages with Homebrew is super easy, just use the following syntax:

brew install [package name]

For example, to install wget through Homebrew you could use the following syntax:

Simple, easy. Once complete you can run wget as usual.

A quick side note; Homebrew is not the only way to install command line software, you can install command line tools on a Mac yourself and then compile and make software independently. For example, we discuss installing wget on Mac OS without Homebrew here and it uses the typical configure and make process. There’s nothing wrong with that approach (and arguably it might be preferable for users who want limited packages and a slimmer footprint) but if you’re accustomed to a package manager like dpkg, apt-get, or rpm you’ll almost certainly appreciate and prefer to use Homebrew.

How to Disable Homebrew Analytics Tracking

Homebrew now defaults to using anonymized behavioral analytics tracking. If you do not want to participate in that or you’d just rather disable the feature to reduce network traffic or for privacy purposes, or whatever other reason, you can run the following command after successfully installing Homebrew on a Mac. This will opt out of Homebrew analytics:

brew analytics off

Hit return and after a moment or so the analytics tracking in Homebrew will be disabled.

How to Remove HomeBrew from a Mac

If you have installed Homebrew but later decide you want to remove Homebrew from a Mac for some reason or another, you can uninstall it with another ruby script run from the command line, choose the script that aligns with your version of MacOS:

Removing Homebrew in MacOS Catalina, macOS Big Sur, and MacOS Mojave:

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

Removing Homebrew from MacOS High Sierra, Sierra, El Capitan, and earlier:
ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)»

Alternatively, you could download that “uninstall” script directly and run it yourself.

Источник

Как установить Homebrew на Mac

Опытные пользователи Mac будут только рады иметь возможность работать с файловым менеджером Homebrew, который в разы облегчает процесс использования командной строки на Mac.

Если вы хотите использовать команды, как: cask, htop, wget, nmap, tree, irssi, links, colordiff и т.д., это можно будет делать очень легко. Homebrew сам скачает за вас все файлы.

Программа предназначена только для продвинутых пользователей Mac, которые часто работают с командной строкой. Новички тоже могут установить Homebrew, но вряд ли программа принесёт им много пользы, поскольку сначала нужно научиться работать с командами. Если же вы умеете работать с Terminal или знакомы с командной строкой платформы Windows или Linux, Homebrew точно вам пригодится.

Требования для установки Homebrew на Mac

  • Mac с Mac OS X10 или новее, более ранние версии поддерживаются частично.
  • Инструменты командной строки (установленные по отдельности или через Xcode).
  • Умение работать с командной строкой и использовать bash или zsh.

Если у вас готово всё вышеперечисленное, то можете приступать к инструкции.

Как установить Homebrew на Mac

Самый простой способ установить Homebrew – с помощью ruby и curl в дополнении с одной простой командой. Данный метод работает со всеми версиями Mac OS и Mac OS X.

  1. Откройте программу Terminal, которая находится в Утилитах.
  2. Введите следующую команду в одну строку:

3. Нажмите Return/Enter и увидите много строк о том, что и куда будет установлено. Нажмите Return/Enter ещё раз, чтобы принять.

4. Введите пароль администратора, чтобы начать установку.

Установка Homebrew займёт некоторое время в зависимости от скорости вашего компьютера и интернет-соединения.

После завершения процесса вы увидите сообщение: «Installation successful!».

Теперь вы можете устанавливать файлы через Homebrew. Документ с поддержкой можно почитать с помощью следующей команды:

Как устанавливать файлы через Homebrew

Файлы устанавливаются с помощью такой команды:

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

Всё легко и просто.

С помощью Homebrew легко не только устанавливать файлы через командную строку, но и инструменты командной строки. Конечно, это можно делать и с помощью других программ, но Homebrew во много раз облегчает процесс.

Как отключить аналитику Hombebrew

По умолчанию Homebrew отслеживает данные для аналитики. Если вы по какой-то причине хотите отключить данную функцию, используйте следующую команду:

Как удалить HomeBrew с Mac

Если вам нужно будет удалить программу со своего компьютера, это делается следующим образом:

Или же можно скачать скрипт «uninstall» и запустить его самостоятельно.

Источник

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

  • Mac os bootcamp установка windows
  • Mac os boot log
  • Mac os boot args
  • Mac os bonjour настройка
  • Mac os blade and soul