Homebrew El Capitan

  1. Homebrew El Capitan 2
  2. Homebrew El Capitan Software
  3. Homebrew El Capitan Software

How to install brew packages based on XCode, Ruby, Homebrew

  • Install Homebrew
  • Formulas

This tutorial provides a deep dive of Homebrew,a package manager for Mac OSX (MacOS)that’s like other package mangers for Linux:

DistributionPackage Manager FormatGUI tools
Darwin (macOS)Homebrew-brew
Debian, Ubuntudpkg.debAPT (Advanced Packaging Tool)
RedHat, Fedora, openSUSERPM.rpmYum, apt4rpm, up2date, urpmi, ZYpp, poldek
Slackwaretgz--
Arch Linux, Frugalware, DeLi LinuxPacman--
Puppy LinuxPETget--
WindowsChocolatey-choco

I can't run brew upgrade without it hanging indefinitely. I'm using El Capitan OS. Here's the input/output: $ brew upgrade Updating Homebrew. Auto-updated Homebrew!

GRASS GIS 7.0.x for El Capitan without disabling SIP. The new homebrew recipe for GRASS 7.0 does install on El Capitan with SIP enabled! This is thanks to Larry Shaffer. Due to SIP restriction, the old HomeBrew(Migrated from Yosemite or older macOS) does not work well on El Capitan(and newer). $ brew update Error: /usr/local is not writable. You should change the. OS X El CapitanでHomebrewを使うための注意点が 「El Capitan & Homebrew」にまとめられています。 クリーンインストールされたEl CapitanにHomebrewをインストールする場合. Install Python3 and Postgres (OS X El Capitan) via Homebrew Another Post on Installing Python3 and Postgres? I’ve already written a tutorial on how to set up a new Mac for Python-Django development with PostgreSQL as the database engine; however, that tutorial used the Python3 installer downloaded from the Python website.

Step-by-step instructions are provided here to install Homebrew itselfand then install Homebrew packages based on the name of formulae specified for installationin a command such as:

brew install wget

DEFINITION: A formula provides instructions on how to install packages andtheir dependencies, such as where to find tar.gzip files for download.

Brew installs packages in its own Cellar directory (folder)and adds symlinks to the /usr/local folder.

Homebrew is the newest and most popular package utility on OSX.

Homebrew’s web page is at http://brew.sh

Alternatives to Homebrew

Preparations: XCode CLI

  1. Make a full backup of your system right before following these instructions.

  2. Open the App Store to install XCode, Apple’s IDE for developing Swift and Objective-C to run on iPhones and iPads.

    PROTIP: Apple’s App Store only installs .app files. So programs invoked from the command line Terminal (such as gcc) need to be installed a different way.

  3. To verify XCode CLI install:

    This message means that it’s not installed:

  4. Open a Terminal to install XCode CLI:

    If XCode is not already installed, you are prompted to install it:

    Installation is to folder: /Library/Developer/CommandLineTools/.

    Homebrew requires OS X 10.5+ and the Xcode command line tools.

    To download the Command Line Utilities, go to https://developer.apple.com/download/more/and look for your version of “Command Line Tools (macOS 10.14) for XCode 10”, one that doesn’t say “beta”.

  5. Since the El Capitan version of Mac OSX, file permissions in /usr/local have changed,causing error messages such as:

    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

    So in a Terminal shell window at any folder:

    sudo chown -R :staff /usr/local

  6. Verify installation by getting the version of the GNU Compiler Collection:

    gcc --version

    You should see something like this (for Mojave):

Install Homebrew

Homebrew makes use of Ruby, which comes with macOS.

  1. Install Homebrew if you haven’t already.

    CAUTION: Don’t press Enter on the Terminal until the Download Software dialog reaches 100%.

  2. Press the Enter key to the message:
    Press RETURN to continue or any other key to abort. then

  3. To proceed, enter the root password, or type Ctrl+C to abort.

    NOTE: The download is from
    https://github.com/Homebrew/homebrew/

    HISTORICAL NOTE: Previously, the Homebrew installer was at
    https://raw.github.com/Homebrew/homebrew/go/install/

  4. Identify where the Homebrew program itself is located:

    The response is the brew executable program at:

    The “brew” above is a shell script file.

    PROTIP: The “/usr/local” is the default specified by the $HOMEBREW_PREFIX environment variable.

  5. Identify where the Homebrew program stores packages:

    The response:

    Update Homebrew itself

  6. Get Homebrew version:

    The response (at time of writing):

    NOTE: Homebrew is open-sourced at
    https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Common-Issues.md

  7. To update Homebrew itself and its formulas:

    brew update
    brew update

    Yes, run it twice to make sure all dependencies took.

    Each run can take several minutes.

Formulas

Popular formulas

wget

iterm2

htop

geoip

nmap

Search for a formula to install

  1. Use an internet browser (such as Google Chrome)to view formula defined in

    • http://braumeister.org provides recent activity.

    Install formula

  2. Install the wget command-line utility by formula name (for example, wget):

    brew install wget

    This installs to folder /usr/local/bin/wget.

    See Tips & Tricks on how to use proxy, remove the beer mug emoji, highlighting within editors, etc.

    How many?

  3. Get a count of kegs, how many files, and the disk space they take:

    A sample response:

    Where did it go?

  4. List where .tar.gz “bottle” files are downloaded into from the internet:

    DEFINITION: A “Bottle” is a pre-built binary Keg used for installation instead of building from source.It can be unpacked.

    The response includes your user name, which enablesHomebrew to work without using sudo (elevation to root).

    The equivalent of the above is:

  5. List bottles downloaded:

    Examples of responses:

  6. List brew formulas installed:

    ls /usr/local/Cellar
    brew list
    brew ls

    The alternative commands above all do the same thing of the same folder,for example:

    There is no response if no brew package has been installed.

  7. See one level below one of the above folders for a specific formula,such as openssl:

    It is usually a version number, such as:

    DEFINITION: A “Keg” is the installation prefix of a formula, such as:

    Packages

  8. List brew package .rb (Ruby language) files installed:

    The response is a long list.

  9. List brew package folders:

    brew search

    The response is a long list.

Troubleshoot Homebrew

  1. Different ways to install weget.

    The above is one of several ways to install the wget command-line utility.

    One way is to install Apple’s Xcode.

    Test wget operating:

    cd ~/Downloads
    wget http://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz

  2. Verify brew installation:

    brew doctor

    If you see this message at the top of messages returned:

    The above may occur if curl and nodejs were installed without using homebrew.

    Remove them before installing node and curl using Homebrew:

  3. Create symlinks to installations performed manually in Cellar. This allows you to have the flexibility to install things on your own but still have those participate as dependencies in homebrew formulas.

    First, see what exactly will be overwritten, without actually doing it:

    The response is:

    “Keg-only” refers to a formula installed only into the Cellar and not linked into /usr/local, which means most tools will not find it. This is to avoid conflicting with the system version of the same package.

    Alternately, if aswcli is specified for dry-run, the response is:

    brew link

    NOTE: Homebrew installs to the Cellar it then symlinks some of the installation into /usr/local so that other programs can see what’s going on.

    A symlink to the active version of a Keg is called an “opt prefix”.

  4. List where a link goes:

    ls -l $(which wget)

    Prune symlinks

    If you see this message:

    A sample response:

  5. List formula (package definitions):

    brew edit $FORMULA

    The above command brings you to your default text editor (vim or whatever is specified in the $EDITOR variable).

    Type :q to quit out.

Upgrade brew formulas

  1. List brew packages that are obsolete:

    brew outdated

    To stop a specific package from being updated/upgraded,pin it:

    brew pin $FORMULA

    $FORMULA is ???

    To allow that formulae to update again, unpin it.

  2. Download and update ALL software packages installed:

    brew upgrade

  3. To see which files would be removed as no longer needed:

    brew cleanup -n

    No response if there is nothing to clean. Otherwise, example:

  4. To really remove all files no longer needed:

    brew cleanup

    A sample response:

Remove/Uninstalll

PROTIP: Before deleting, identify its dependencies. For example:

Two delete commands does the same: Additional flags: `–force` or `-f` forcibly removes all versions of that package. `–ignore-dependencies` ignore dependencies for the formula when uninstalling the designated package, which may cause other brews to no longer work correctly.## Tap #Brew tap adds repos not in the Homebrew master repofrom inside a larger package.https://github.com/Homebrew/brew/blob/master/docs/brew-tap.mdsays tap adds to the list of formulae that brew tracks, updates, and installs from.0. List brew tap packages already installed: 0. Install the ip tool included with iproute2 on Linux: The command specififies the account and repo in GitHub, as in
https://github.com/brona/iproute2mac or https://superuser.com/questions/687310/ip-command-in-mac-os-x-terminal 0. Try it (instead of ifconfig): 0. Remove a tap: ## brew install --cask #Homebrew cask extends homebrew and brings its elegance, simplicity, and speed to MacOS (OS X) GUI

Homebrew El Capitan 2

applications and large binaries.https://caskroom.github.ioWith Cask, you can skip the long URLs, the 'To install, drag this icon…', and manually deleting installer files.0. Temporarily set the permissions on /usr/local: 0. Install brew cask: Applications are kept in their Caskroom under /opt and symblinked to $HOME/Applications from https://github.com/caskroom/homebrew-cask0. https://caskroom.github.io, the home page, said there are 3,197 casks as of June 5, 2016. QUESTION: Is there a graph of growth in cask counts over time?0. Install the cask extension to Homebrew: Alternately: 0. Search for a cask by name, in website is where casks are obtained: https://github.com/caskroom/homebrew-cask/search?utf8=✓ Alternately, run a search command. This example searches for 'yo': PROTIP: One should see the cask definition before using it. I would be suspicious of casks with sparse information. The safe way to get the homepage URL of the programmer is from here (don't Google it and end up at a rogue site).0. Look at some cask definitions: https://github.com/caskroom/homebrew-cask/blob/master/Casks/google-chrome.rb is a sample cask definition:0. Install the cask: brew install --cask google-chrome Cask downloads then moves the app to the ~/Applications folder, so it can be opened this way:0. Open the installed cask from Terminal: 0. Installing with cask enables you to cleanup: ### Error prevention If you get an error about 'permissions denied':0. Create a Caskroom folder 0. Edit the .bash_profile 0. Add this line: QUESTION: The use of --caskroom is deprecated?0. Save the file.0. Restart the terminal. ## GUI for Homebrew packageshttps://www.cakebrew.com/ is a GUI to help manage Homebrew packages: ## Analytics offHomebrew now defaults to retrieving behavioral analytics tracking. Although anonymized, you may not want to participate in that. To disable the extra network traffic: ## Debian apt-getDownload Fink commander Fink Installer.pkg from
http://finkcommander.sourceforge.net/help/install.phpThis explains: Fink stores data in the directory “/sw” by default. This goes against the Filesystem Hierarchy Standard’s recommendation to use “/usr/local”. Within Fink’s directory, a FHS-like layout (/sw/bin, /sw/include, /sw/lib, etc.) is used.## Documentation #0. For more documentation on brew, look here and: man brew

Homebrew El Capitan Software

## Social media #Social media from brew's readme: * @MacHomebrew on Twitter * IRC freenode.net#machomebrew * Email homebrew-discuss@googlegroups.com * Read archive of emails at https://groups.google.com/forum/#!forum/homebrew-discuss## More on OSXThis is one of a series on Mac OSX:* [MacOS Hardware and accessories](/apple-macbook-hardware/)* [MacOS Boot-up](/macos-bootup/)* [MacOS Versions](/apple-mac-osx-versions/)* [MacOS Terminal Tips and Tricks](/mac-osx-terminal/)* [MacOS Find (files and text in files)](/find/)* [MacOS Keyboard tricks](/apple-mac-osx-keyboard/)* [Text editors and IDEs on MacOS](/text-editors/)* [Command-line utilities for MacOS](/mac-utilities/)* [MacOS Setup automation](/ansible-mac-osx-setup/)* [MacOS Homebrew installers](/macos-homebrew/)* [Task Runners Grunt and Gulp](/task-runners/)* [Printing from macOS or Linux](/printing/)* [Manage Disk Space on MacOS](/mac-diskspace/)* [Data Backups on MacOS](/apple-mac-osx-backup/)* [Screen capture on MacOS](/screen-capture-apple-mac-osx/)* [Ports open](/ports-open/)* [Applications on MacOS](/apple-mac-osx-apps/)* [1password on MacOS](/1password/)* [MacOS iPhone integration](/mac-iphone/)* [Windows on Apple MacOS](/windows-on-apple-mac-osx/)* [Packer create Vagrant Windows image](/packer/)* [Remote into Windows](/rdp/)* [Python on MacOS](/python-install/)* [Maven on MacOS](/maven-on-macos/)* [Ruby on MacOS](/ruby-on-apple-mac-osx/)* [Java on MacOS](/java-on-apple-mac-osx/)* [Node on MacOS installation](/node-osx-install/)* [PHP on MacOS](/php-on-apple-mac-osx/)* [Scala ecosystem](/scala-ecosystem/)Please enable JavaScript to view the comments powered by Disqus.

Installing Homebrew on Mac OS X prior to El Capitan (that is Yosemite, Mavericks and others) used to be a breeze. But with a new change in OS X El Capitan called SIP - installing Homebrew has become a bit complicated.

You need not worry, I have got you covered.

There are two parts to this tutorial. If you want to uninstall or delete Homebrew first and then re-install it on El Capitan then follow Part 2 of this tutorial below. However, if you are doing a fresh installation of El Capitan then follow the steps outlined in Part 1 of this tutorial.

Happy Brewing!

Part 1: How to install fresh copy of Homebrew in OS X El Capitan

Step 1 - Install XCode by downloading it from here. This is needed for installing the XCode command line tools which in turn is needed by Homebrew. You might skip this step if you already have XCode installed.

Quick Note - If you already have XCode installed then go to STep 2. Also, You can skip this step and jump to Step 3 instead and see if the Homebrew installer complains about XCode command line tools. If it does, then come back to this step and continue.

Step 2 - Install Command Line tools by running the following command in terminal:

Step 3 - Now, you need to get a fresh copy of Homebrew and then run the install script. You can perform both these tasks using this one command in the terminal app:

If it complains about permission issues, then you have to fix it before you can continue. This is an additional thing that you need to do in Mac OS X El Capitan because Apple introduced this new feature called System Integrity Protector. Here is a guide to how you can fix this permission issue with Homebrew on OS X El Capitan.

After you have fixed the permission issue, re-run the command above in the terminal to begin the Homebrew installation process.

Step 4 - Run the Brew Doctor utility to check for issues or warnings in the terminal

brew doctor

If it shows errors, then you need to fix them before you can continue. You might, however, skip any warnings that the doctor tool shows.

All the apps and libraries that you install using Homebrew are located in this folder: /usr/local/Cellar

After Homebrew is installed, you can use some of the following commands to perform different tasks with it:

  1. You can search for an application using: brew search
  2. You can install a new application using: brew install <application-name>
  3. In order to list all apps installed by Homebrew, you can use: brew list
  4. For removing an app installed via Homebrew: brew remove <application-name>
  5. Homebrew can be updated using: brew update
  6. man brew will show other switches and command options for Homebrew.

Part 2: How to uninstall and re-install Homebrew in OS X El Capitan

Step 1 - First you will have to delete the Cellar folder of Homebrew that is usually available in the /usr/local folder. To do this, you need to run the following command in the terminal:

Homebrew

rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup

Please note - If the above command throws a permissions error then you need to read this article to fix the Homebrew permissions in OS X El Capitan.

Step 2 - Install Xcode & XCode command line tools. This is an optional step but for many users, installing the tools mentioned in this step is mandatory. So in order to check, if you have to really perform this step, what you can do is quickly skip to Step 3 and run the command mentioned on that step - if you see success then you can safely skip this step, else continue here:

First download and install Xcode from this link - https://itunes.apple.com/au/app/xcode/id497799835?mt=12

Next, install Xcode command line tools by running the following command in your terminal:

If it complains about permissions, then use sudo and run the same command again.

Step 3 - Now that you have a cleaned-up Brew data folder, you need to fetch a fresh copy of Homebrew and start the installation process by running this command in the terminal:

You might be prompted for your root password and when that happens, enter the password and continue. You can find some sample output towards the end of this post.

Homebrew El Capitan Software

Step 4 - After the installation completes, you should run the doctor utility on brew to see if there were any issues with the Homebrew installation. This can be done by running the following command:

brew doctor

If it returns any error, try fixing them. If you see just warnings then you could ignore them.

At this point you have succesfully installed Homebrew on El Capitan and you can use the commands mentioned above to perform various operations.

Some sample Outputs:

?>