brew.sh | 🔖 The Homebrew homepage | Plugin library
kandi X-RAY | brew.sh Summary
kandi X-RAY | brew.sh Summary
The webpage uses jekyll. The template for the index is at _layouts/index.html.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of brew.sh
brew.sh Key Features
brew.sh Examples and Code Snippets
Community Discussions
Trending Discussions on brew.sh
QUESTION
Simply put: I want to list the last N packages I've installed with Homebrew.
What is the best (and possibly fastest) way to accomplish this?
Note that I'm not fluent in Ruby, so any suggestions to 'hack the Homebrew code to do what you want' would get me nervous...
What I tried so far- Read man pages, documentation, the Homebrew website, StackOverflow, googled with all sorts of variant questions, etc. No luck so far.
brew info [formula|cask]
will actually tell the date when a formula/cask has been poured (which I assume means 'installed' outside the Homebrewosphere). So that value must be written somewhere — a database? a log?- Maybe there is an option to extract the poured date information via the JSON API? But the truth is that with Homebrew 3.1.9-121-g654c78c, I couldn't get any
poured-date
or similar element on the JSON output... the only dates that I get are related togit
(presumably because they're more useful for Homebrew's internal workings). This would, in theory, be able to tell me what are the 'newest' versions of the formulae I have installed, but not the order I have installed them — in other words, I could have installed a year-old version yesterday, and I don't need to know that it's one year old, I only want to know I've installed it yesterday!
Although I couldn't figure out how to retrieve that information, I'm sure it is there, since brew info ...
will give the correct day a particular formula was poured. Thus, one possible solution would be to capture all the information from brew info
and then do a grep
on it; thus, something like brew info | grep Poured
should give me what I want. Needless to say, this takes eternities to run (in fact, I never managed to complete it — I gave up after several minutes).
Of course, I found out that there is a brew info --installed
option — but currently, it only works with JSON output. And since JSON output will not tell the poured date, this isn't useful.
A possibility would be to do it in the following way:
- Extract all installed package names with
brew info --installed --json=v1 | jq "map(.name)" > inst.json
- Parse the result so that it becomes a single line, e.g.
cat inst.json | tr -d '\n\r\[\]\"\,'
- Now run
brew info --formula
(treat everything as a formula to avoid warnings) with that single line, pipe the result in another file (e.g.all-installed.txt
) - Go through that file, extract the line with the formula name and the date, and format it using something like
cat all-installed.txt | sed -E 's/([[:alnum:]]+):? stable.*\n(.*\n){3,7}^ Poured from bottle on (.*)$/\1 -- \3\\n/g' | sort | tail -40
— the idea is to have lines just with the date and the formula name, so that it can get easily sorted [note: I'm aware that the regex shown doesn't work, it was just part of a failed attempt before I gave up this approach]
Messy. It also takes a lot of time to process everything. You can put it all in a single line and avoid the intermediary files, if you're prepared to stare at a blank screen and wait for several minutes.
The quick and dirty approachI was trying to look for a) installation logs; b) some sort of database where brew
would store the information I was trying to extract (and that brew info
has access to). Most of the 'logs' I found were actually related to patching individual packages (so that if something goes wrong, you can presumably email the maintainer). However, by sheer chance, I also noticed that every package has an INSTALL_RECEIPT.json
inside /usr/local/Cellar/
, which seems to have the output of brew info --json=v1 package-name
. Whatever the purpose of this file, it has a precious bit of information: it has been created on the date that this package was installed!
That was quite a bit of luck for me, because now I could simply stat
this file and get its creation timestamp. Because the formula directories are quite well-formed and easy to parse, I could do something very simple, just using stat
and some formatting things which took me an eternity to figure out (mostly because stat
under BSD-inspired Unixes has different options than those popular with the SysV-inspired Linux).
For example, to get the last 40 installed formulae:
...ANSWER
Answered 2021-Jun-06 at 05:31The "brew list" command has a -t option:
Sort formulae and/or casks by time modified, listing most recently modified first.
Thus to get the most recent 40, you could write:
QUESTION
I am trying to install this software called Next browser. There is a page about it on brew.sh.
When I run the command displayed on homebrew's webpage on my Ubuntu 18.04 LTS terminal:
...ANSWER
Answered 2021-May-10 at 09:27Casks install are only available on macOS because they install macOS-specific .app
files.
This probably explain the error you get, although it could be made clearer.
QUESTION
Wirting a simple bash script
...ANSWER
Answered 2021-Mar-08 at 10:29There are a few options,
If you are using a Git repository or a version control system, where a setting is available to automatically change line endings, from LF to CRLF. When a user downloads a script. Most users have a version control system, and prefer this method, if it is just line endings you are dealing with, when it comes to running the same script.
Have two versions of a file within two folders, which is one for Windows and one for Linux, or in your script write some code to detect what the OS is and then run your code which would work with the OS.
Software which can convert a file for executing from Windows to Linux, you are using one already called doc2unix
QUESTION
After using migration assistant to move from my MacBook Pro 2018 I5 to the new MacBook Pro 2020 M1, I tried to run R at the command line simply with R
and got the errors:
ANSWER
Answered 2021-Mar-07 at 01:25I realized this was probably a git and/or homebrew problem, so I used instructions from the homebrew site indicated in the error in the prescribed directory with sudo mkdir homebrew && sudo curl -L https://github.com/Homebrew/brew/tarball/master | sudo tar xz --strip 1 -C homebrew
and got the same errors. At this point I updated my Mac OS, to 11.2.2., and found this great walkthrough. This solved all my problems and I was able to upgrade my git, install xquartz, R, and Rstudio with brew:
QUESTION
I have googled around the error I was experiencing but from what I could tell this issue is likely related to how the path in which Homebrew is saved for Big Sur/Apple Silicon is different than other Macbook approaches.
Following the instructions on the Homebrew page, I ran the cURL
command:
ANSWER
Answered 2021-Jan-05 at 07:36In this case, I discovered it was a combination of a PATH issue as well as the .zshrc file was missing from the ~/
directory
I was able to resolve the issue with these steps.
- Navigate to
cd /opt/homebrew/bin/
- Run
export PATH=$PATH:/opt/homebrew/bin
- Navigate back to "home" with
cd ~/
- in this directory I found that there was no .zshrc file (:scream:)
- So I created a file with
touch .zshrc
and then - ran this command:
echo export PATH=$PATH:/opt/homebrew/bin >> .zshrc
And after running that command, I was able to successfully use the brew doctor
and other related commands!
QUESTION
I use the latest Apple M1
chip processor. And I keep getting errors while application installation.
say.,
...ANSWER
Answered 2020-Nov-23 at 06:27Did a temporary fix by enabling Open using Rosetta
option in the terminal app from Utilities
folder.
However, it would be great to know the actual solution for this question to use the native way.
QUESTION
I'm on the new M1 MacBook Pro. I'm trying to install gtk+3 (which has native apple silicon support) via Homebrew. First it told me
Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)! Please create a new installation in /opt/homebrew using one of the "Alternative Installs" from: https://docs.brew.sh/Installation You can migrate your previously installed formula list with: brew bundle dump
I tried to run the terminal via Rosetta 2, but gtk+3 needs ARM support to install, so that didn't work.
I tried to manually unzip the code line in docs.brew.sh in /opt/
but it told me I don't have permission. I tried to sudo it, but to no avail. Any help?
Edit 1: for full message:
...ANSWER
Answered 2020-Nov-20 at 12:16I solved it running under the Rosetta Terminal
Locate the Terminal application within the Utilities folder (Finder> Go menu > Utilities)
Select Terminal.app and right-click on it, then choose “Duplicate” Rename the duplicated Terminal app something obvious and distinct, like ‘Rosetta Terminal’
Now select the freshly renamed ‘Rosetta Terminal’ app and right-click and choose “Get Info” (or hit Command+i)
Check the box for “Open using Rosetta”, then close the Get Info window Run the “Rosetta Terminal” as usual, which will fully support Homebrew and other x86 command line apps
QUESTION
When I was trying to install a package with brew, this error message shows up:
...ANSWER
Answered 2020-Dec-14 at 08:51I have the same problem as yours. And I've solved that by
QUESTION
I'm studying the Midi file specification, right now I'm testing this, which works fine if played by Timidity but it's corrupted for either Garage Band, OS X(The output doesn't play) and Synthesia.
...ANSWER
Answered 2020-Nov-26 at 19:44After taking a deep look with hexdump, and looking at the defined chunk lengths:
first chunk declares to be 0x20
(32) bytes long, starting at position 0x17
(23) and ends at 0x5b
(91) that means that your chunk lenght calculations are off by 34 bytes.
QUESTION
I want to use brew to install pre-commit for python 3.6.8. I am using macOS Catalina (Version 10.15.7)
I am using brew install pre-commit
to do the installation.
I am having issues because my pre-commit uses Python 3.9 and I want to avoid this (i.e. make brew pre-commit use python 3.6).
When I try brew install pre-commit
, I find that automatically one sees the message Downloading https://homebrew.bintray.com/bottles/python%403.9-3.9.0_2.catalina.bottle.tar.gz
.
The environment that I am on is python 3.6.8. ( python -V
returns python 3.6.8
).
Also,
...ANSWER
Answered 2020-Nov-24 at 17:23brew only really works with the latest versions of software -- they package bottles against the latest version of python
you can pin against older formulas, though at this point the 3.6 packages no longer cleanly build (I tried, as a way to show you how to do this, but they've bitrotted)
since it looks like you're using pyenv
-- probably your best bet is to install a python3.6 using that and then use pip
to install pre-commit
from there
I don't use pyenv myself, but if I recall correctly you'd run:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install brew.sh
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page