I did some googling and could not find an answer to this question. Say package X is updated to 1.1 on git, how long does it take brew to get that package?
brew update & brew upgrade X
Error: X 1.0 already installed
Already up-to-date.
note it is a version behind.
ruby-build was updated today but brew's version is still behind.
When or how long after, are source packages available on brew after they are released?
Related
I brew install --HEAD'd node recently to see if the upstream version fixed a bug I was experiencing. (It did!)
Now I'd like to downgrade back to the stable, bottled version. Is there a simple command to do so?
brew reinstall simply pulls & rebuilds the HEAD version from upstream. (Where does Homebrew "remember" my HEAD preference?)
brew uninstall --ignore-dependencies && brew install is of course possible, but annoying given that it would also delete my build history & install receipts, which I'd like to keep around a bit if possible.
I did the same thing for pyenv while waiting for version 2.1.0 to make it into homebrew-core. I figured I'd simply uninstall pyenv and reinstall it without --HEAD, but when I attempted to do so, Homebrew told me:
Only uninstalling HEAD version because multiple versions are installed
(Or something like that.)
The documentation doesn't really explain this, as far as I can tell, but I did find an explanation here:
uninstall first removes whichever version is "active", i.e. linked into the main prefix. What happens when you run uninstall again depends on how many other versions are installed: if there is only one, it is removed, otherwise it errors out because it doesn't know which one to uninstall (unless you pass --force).
So I didn't need to do anything else, aside from delete the pyenv repository that Homebrew cloned under ~/Library/Caches/Homebrew/pyenv--git. (I think the fact that it doesn't remove this might be a bug.)
Now, if you first uninstalled node stable, then installed HEAD, your situation might be different.
(I know this might not be a great answer, but it's too long for a comment.)
I'm new to brew. Why does brew have both a python and a python#3.8 package? If I do a "brew search", many of the packages don't have version numbers in them.
It's also interesting how if I do a "brew search openssl", it only shows me openss#1.1, but not just openssl.
What Mark said is right, we have big chunk of homebrew formulae depends on Python. So using versioned formula would be easier for us to prioritize the python 3.8 migration (we do even have a migration label for it.)
As you know this is the first year for fully deprecate Python 2, which would be painful for any package manager to do the inventory check. :)
I'm using Home Brew on my system to allow users to install some packages; there are some that are installed at the system level (e.g. build-essential) but when I run a formula brew is not able to see them and download them. Is this the expected behavior or is there something I can do to fix this?
It's an expected behavior. Homebrew on Linux, namely Linuxbrew, uses its own libraries.
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.
References
Homebrew documentation of Linuxbrew
I'm familiarizing myself with the whole homebrew kit and the documentation is rather poor.
What is a cask, Cellar and a tap?
Homebrew-Cask is an extension to Homebrew to install GUI applications such as Google Chrome or Atom. It started independently but its maintainers now work closely with Homebrew’s core team.
Homebrew calls its package definition files “formulae” (British plural for “formula”). Homebrew-Cask calls them “casks”. A cask, just like a formula, is a file written in a Ruby-based DSL that describes how to install something.
The Cellar is where Homebrew installs things. Its default path is /usr/local/Cellar (/opt/homebrew/Cellar on Apple Silicon). It then add symlinks from standard locations to it.
For example, when you type brew install git:
Homebrew installs it under /usr/local/Cellar/git/<version>/, with the git binary in /usr/local/Cellar/git/<version>/bin/git
It adds a symlink from /usr/local/bin/git to that binary
This allows Homebrew to keep track of what’s installed by Homebrew versus software installed by other means.
A tap is a source of formulae. The default is homebrew/core but you can add more of them. The simplest way to create a formula for your own software is to create a GitHub repository called homebrew-<something>; put your formula file in it; then type brew tap <username>/<something> to add this new source of formulae to your Homebrew installation and so get access to all its formulae.
Some companies have internal Homebrew taps for their own utilities. There are a lot of public taps like atlassian/tap for Atlassian software, or ska-sa/tap for radio astronomy. Homebrew itself used to have additional taps like homebrew/science but they deprecated them and imported the formulæ in homebrew/core.
I personally differentiate brew & cask just based on 1 of the main (if not the only main) differences, of graphical GUI applications being managed by cask rather than just brew. (There are other differences too which I don't know as much about).
Below adapted from 'Graham Miln' on apple.stackexchange:
Homebrew
brew is the core command for the Homebrew project.
The missing package manager for OS X
Homebrew installs the stuff you need that Apple didn’t.
Homebrew typically deals with command line software (not graphical GUI applications). Most of the software is distributed under an open source licence.
Cask
brew cask is an extension to brew that allows management of graphical GUI applications.
Homebrew Cask extends Homebrew and brings its elegance, simplicity,
and speed to OS X applications and large binaries alike.
Cask deals with a mixture of software and licences.
Cask offers a way to command line manage the installation of graphical GUI applications.
Licensing
Availability through brew or cask does not imply any specific licence.
Quoting from official docs:
Cask
https://github.com/Homebrew/homebrew-cask
Homebrew Cask extends Homebrew and brings its elegance, simplicity,
and speed to the installation and management of GUI macOS applications
such as Atom and Google Chrome.
Cellar
https://docs.brew.sh/Formula-Cookbook
Homebrew installs to the Cellar and then symlinks some of the
installation into /usr/local so that other programs can see what’s
going on.
Tap
https://docs.brew.sh/Taps
Taps (Third-Party Repositories)
brew tap adds more repositories to the
list of formulae that brew tracks, updates, and installs from. By
default, tap assumes that the repositories come from GitHub, but the
command isn’t limited to any one location.
Update on command:
The current version of homebrew deprecated the "brew cask" syntax. From now on, se the --cask modifier instead.
brew --cask
I upgraded my mac to Sierra and I can't install qt. I wrote "brew install qt" and I received the message below. Do you have any recommendations?
"This formula either does not compile or function as expected on macOS
versions newer than El Capitan due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build."
if you really need qt4, you can try
brew install cartr/qt4/qt
I was able to sucessfully work around this on a fresh install of Sierra this evening.
It looks like qt.rb will execute just fine on MacOS Sierra, you just need to remove the Maximum OS requirement entry to allow it to run.
This is what was required on my machine.
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/qt.rb
Comment out line 36 as follows
#depends_on MaximumMacOSRequirement => :el_capitan
I am curious if this works for others.
Thanks
Searching with
brew search qt
you can see there is a QT5
brew install qt5
According to https://github.com/Homebrew/homebrew-core/issues/1957#issuecomment-225806023 there will be no support for qt(4)
Qt4 is not supported anymore; users should upgrade to Qt5. Homebrew backported a fix for 10.11 but doesn’t intend to maintain this forever. There’s currently a pull-request that may fix that. You’ll have to wait for it to be merged if you want to install Qt4 with Homebrew.
install qt4
Please note: Qt4 is unsupported by its creators, so there are likely security/usability problems with it that will never be resolved. If you can, please consider migrating your projects to Qt5.
resource : https://github.com/cartr/homebrew-qt4
brew tap cartr/qt4
brew tap-pin cartr/qt4
brew install qt