Содержание
- cannot install on Mac OSX 10.8.5 ==> Downloading and installing Homebrew. You must: brew install git You must: brew install git Error: Git is unavailable #2385
- Comments
- Bug reports:
- brew update fails with «Git must be installed and in your PATH!» #3029
- Comments
- brandonsimpson / reinstall_git_brew.md
- Homebrew not finding newer git from $PATH #6274
- Comments
- What you were trying to do (and why)
- What happened (include command output)
- What you expected to happen
- Step-by-step reproduction instructions (by running brew commands)
- brew doctor
- brew config
cannot install on Mac OSX 10.8.5 ==> Downloading and installing Homebrew. You must: brew install git You must: brew install git Error: Git is unavailable #2385
- Ran brew update and retried your prior step?
- Ran brew doctor , fixed as many issues as possible and retried your prior step?
- If you’re seeing permission errors tried running sudo chown -R $(whoami) $(brew —prefix) ?
You can erase any parts of this template not applicable to your Issue.
Bug reports:
Please replace this line with a brief summary of your issue AND if reporting a build issue include the link from:
Katoo$ ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)»
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/.
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew.
You must: brew install git
You must: brew install git
Error: Git is unavailable
Failed during: /usr/local/bin/brew tap homebrew/core
macbookato:
Katoo$ brew install wget
You must: brew install git
You must: brew install git
You must: brew install git
You must: brew install git
Error: Git is unavailable
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
macbookato:
Katoo$ brew update
You must: brew install git
You must: brew install git
Error: Git must be installed and in your PATH!
macbookato:
Katoo$ brew update
You must: brew install git
You must: brew install git
Error: Git must be installed and in your PATH!
macbookato:
Katoo$ brew doctor
You must: brew install git
You must: brew install git
You must: brew install git
You must: brew install git
Error: Git is unavailable
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
macbookato:
Katoo$ brew edit $FORMULA
You must: brew install git
You must: brew install git
Error: Changes will be lost!
The first time you brew update’, all local changes will be lost, you should thus brew update’ before you brew edit’! macbookato:
Источник
brew update fails with «Git must be installed and in your PATH!» #3029
brew update fails with this error:
Detailed infos follows. Thanks for any help!
$ brew update Warning: git-2.9.0 already installed Error: Git must be installed and in your PATH! $ which -a git /usr/local/bin/git /usr/local/bin/git /usr/bin/git $ echo $PATH /Users/stefanscheidt/.sdkman/candidates/maven/current/bin:/Users/stefanscheidt/.sdkman/candidates/ant/current/bin:/Users/stefanscheidt/.rbenv/shims:/Users/stefanscheidt/.nvm/versions/node/v4.3.2/bin. /Users/stefanscheidt/.local/bin:/Users/stefanscheidt/local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin»>
The text was updated successfully, but these errors were encountered:
As of about 30 minutes ago I’m having the exact same problem.
You may need to:
To escape the error. Should only need doing once if brew update remains stuck.
@DomT4 Don’t think that’s necessary any more but folks: if it is, please let me know.
It seems to be, based on checking locally & our CI output. If you ended up there, can’t seem to brew update successfully.
For me, brew update seems to work fine again!
Thanks for the super fast fix!
I had to switch to master to get it work again, and still getting the weird message:
@hannesN What’s your brew doctor and brew config output?
I had the same issues as above, my brew doctor output looked like
I ran xcode-select —install and made sure i had /usr/local/sbin in my path and now brew’s working great again.
Btw, it was working fine yesterday, I think installing macOS High Sierra last night is what tripped it up.
What happens if you manually run git after the update to High Sierra? Does it throw out anything interesting?
The above solution ( xcode-select —install ) fixed my issue, so I deleted my previous comment.
I do remember that running git would print an error message right after the upgrade to High Sierra, but unfortunately I cannot remember the exact error. But I managed to fix it then (again I can’t remember how exactly 🙁
I had this problem this morning, and after reading the comments here I figured it could be related to me having moved Xcode.app to the trash a few days ago. I tried some of the commands suggested here, namely xcode-select —install but nothing worked. Here’s a detailed walkthrough of what I did, although I think the last step alone might fix this issue for you.
Removed all Xcode.app-related leftovers, according to the commands listed in the top answer to this question (and the top comment to that answer, as well).
I ran sudo rm -rf /Library/Developer/CommandLineTools which deleted my standalone version of the command line tools. You might not have this, so this command might return «No such file or directory». This is fine.
I (re)installed the standalone command line tools with xcode-select —install . This still didn’t fix Homebrew finding git for me, so I then read the man page for xcode-select and I did.
sudo xcode-select -r . This should make your brew doctor output «ready to brew».
You might also need to update the newly installed command line tools with the App Store; a new update should show up in the «Updates» section.
Источник
brandonsimpson / reinstall_git_brew.md
Re-installing Git on Mac OSX with Brew
This is helpful if you’ve previously installed git from source on OSX, and other compilers can’t find the correct path. You need to remove the current version of git, then re-install with brew.
Uninstall git if installed manually
Check which git you’re running:
output should be similar to this: /usr/bin/git
Remove that git install
Re-install git with brew
Check which git you’re now running:
Should now say: /usr/local/bin/git
I follow the instructions and then I am being requested to enter a password.
I do enter the password, but I get an error message:
Thanks for your help.
I have gone through the steps you listed in this instruction set, however once I run the «sudo rm -rf /usr/bin/git/» I get the error
rm: /usr/bin/git: Operation not permitted
I am currently running MacOS Mojave v.10.14.6.
and I have Xcode installed (if that means anything).
Please advise.
-Pete8451
I have gone through the steps you listed in this instruction set, however once I run the «sudo rm -rf /usr/bin/git/» I get the error
rm: /usr/bin/git: Operation not permitted
I am currently running MacOS Mojave v.10.14.6.
and I have Xcode installed (if that means anything).
Did you found out a solution for your problem?? I got the same error «Operation not permitted» and I’ve been struggling for days with this problem
I have gone through the steps you listed in this instruction set, however once I run the «sudo rm -rf /usr/bin/git/» I get the error
rm: /usr/bin/git: Operation not permitted
I am currently running MacOS Mojave v.10.14.6.
and I have Xcode installed (if that means anything).
Please advise.
-Pete8451
Did you found out a solution for your problem?? I got the same error «Operation not permitted» and I’ve been struggling for days with this problem
Hey people! I was able to get this issue resolved. However i had to install manually (not using brew initially).
I followed the steps from the Git website to reinstall Git.
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
It automatically updated the git version i had on my Mac. Having XCode on my device did not effect the install. I know this may seem broad, but it worked for me!! hope this helps!
Hi guys, I am having a similar issue. I checked my git version and it was 2.23.0, I did brew install git which should have updated to 2.28.0 I believe however when I restarted my mac and checked git version I still see 2.23.0. I checked which git and it shows «/usr/local/bin/git». How do I know if I am using the right git on my system?
rm: /usr/bin/git: Operation not permitted is because Mac’s «System Integrity Protection».
Hey people! I was able to get this issue resolved. However i had to install manually (not using brew initially).
I followed the steps from the Git website to reinstall Git.
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
It automatically updated the git version i had on my Mac. Having XCode on my device did not effect the install. I know this may seem broad, but it worked for me!! hope this helps!
this worked for me — now running: git version 2.27.0 Catalina 10.15.7
Hi guys, I am having a similar issue. I checked my git version and it was 2.23.0, I did brew install git which should have updated to 2.28.0 I believe however when I restarted my mac and checked git version I still see 2.23.0. I checked which git and it shows «/usr/local/bin/git». How do I know if I am using the right git on my system?
IMPORTANT EDIT — Any solution I wrote in this comment should be ignored unless you’ve already done the following: restarted your terminal after running brew install git (important!), ensured which git is returning /usr/local/bin/git and that this is what brew installed, confirmed /usr/local/bin/git —version is displaying the new version installed via brew, and if git —version is still returning the old Xcode version even after restarting your terminal then you can either use simple workarounds to add the path to the proper git install as others and myself mentioned (shown below this edit) or you can use people’s solutions above to remove Xcode’ git . However it’s unlikely any of this is necessary with newer versions of macOS if you’ve restarted the terminal after installing git with homebrew. For details see @martbe’s comment and my comment below it that explains where confusion can happen after installing git with homebrew alongside Xcode’s git. For newer versions of macOS, the problem that myself and possibly others experienced is due to simply not restarting the terminal after running brew install git .
See above edit before reading further.
If you do which -a git you’ll notice there are multiple versions of git installed assuming you have one installed from XCode (or straight from git) and another that you’ve just installed from homebrew.
The one in /usr/local/bin/git is the one from homebrew which you can confirm with ls -al /usr/local/bin/git and you’ll see it’s symlinked to the git binary installed in homebrew’s Cellar directory. You can alternatively confirm by passing —version to each absolute command path to see which is which.
When you run a non-absolute command like git it will search directories in the $PATH environment variable and use the first command it finds so you should run echo $PATH and ensure that /usr/local/bin comes before /usr/bin , and if it does then running git should run the correct command for you. Btw, macOS sets up the $PATH variable this way by default but if you’ve changed your $PATH just ensure that /usr/local/bin comes first.
If the above is true and $PATH is correct but git —version is still running the /usr/bin/git command then the quickest and simplest fixes are to either:
- Set an alias like somebody else said by adding alias git=»/usr/local/bin/git» to
/.bash_aliases .
If that case is happening where $PATH is correctly loading from /usr/local/bin first but git is still running the /usr/bin/git command, I think this may have to do with Xcode overriding things but somebody else who’s more knowledgeable of Xcode can confirm this since I’m not sure. I’ve just seen odd things like this before, and it would explain some of these weird cases (and I know Xcode has things like xcrun to find tools). I’m just not sure. Edit — This could also be related to @martbe’s point about reloading terminal, even for older versions, not sure. I’m leaving this be now lol. I’ve done enough damage!
Источник
Homebrew not finding newer git from $PATH #6274
- are reporting a bug others will be able to reproduce and not asking a question. If you’re not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
- ran a brew command and reproduced the problem with multiple formulae? If it’s a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it’s a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it’s a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
- ran brew update and can still reproduce the problem?
- ran brew doctor , fixed all issues and can still reproduce the problem?
- ran brew config and brew doctor and included their output with your issue?
What you were trying to do (and why)
brew update a new install of LinuxBrew to /extra/josephlong/.linuxbrew .
What happened (include command output)
Despite the existence of a newer git on $PATH :
Homebrew appears to use system git , which is much older:
which results in the following errors:
Tag creation options
-a annotated tag, needs a message
-m message for the tag
-F message in a file
-s annotated and GPG-signed tag
-u use another key to sign the tag
-f, —force replace the tag if exists
Tag listing options
—contains print only tags that contain the commit
error: unknown option `list’
usage: git tag [-a|-s|-u ] [-f] [-m |-F ] []
or: git tag -d .
or: git tag -l [-n[]] []
or: git tag -v .
Tag creation options
-a annotated tag, needs a message
-m message for the tag
-F message in a file
-s annotated and GPG-signed tag
-u use another key to sign the tag
-f, —force replace the tag if exists
Tag listing options
—contains print only tags that contain the commit
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
error: unknown option `local’
usage: git config [options]
Config file location
—global use global config file
—system use system config file
-f, —file use given config file
Action
—get get value: name [value-regex]
—get-all get all values: key [value-regex]
—get-regexp get values for regexp: name-regex [value-regex]
—replace-all replace all matching variables: name value [value_regex]
—add adds a new variable: name value
—unset removes a variable: name [value-regex]
—unset-all removes all matches: name [value-regex]
—rename-section rename section: old-name new-name
—remove-section remove a section: name
-l, —list list all
-e, —edit opens an editor
—get-color find the color configured: [default]
—get-colorbool
find the color setting: [stdout-is-tty]
Type
—bool value is «true» or «false»
—int value is decimal number
—bool-or-int value is —bool or —int
—path value is a path (file or directory name)
Other
-z, —null terminate values with NUL byte
Error: Failure while executing; git config —local —replace-all homebrew.analyticsmessage true exited with 129.
What you expected to happen
I expected brew update to complete without errors.
Step-by-step reproduction instructions (by running brew commands)
brew doctor
brew config
The text was updated successfully, but these errors were encountered:
Источник
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
Bazookato opened this issue
Jun 25, 2016
· 20 comments
Comments
Please follow the general troubleshooting steps first:
- Ran
brew update
and retried your prior step? - Ran
brew doctor
, fixed as many issues as possible and retried your prior step? - If you’re seeing permission errors tried running
sudo chown -R $(whoami) $(brew --prefix)
?
You can erase any parts of this template not applicable to your Issue.
Bug reports:
Please replace this line with a brief summary of your issue AND if reporting a build issue include the link from:
brew gist-logs <formula>
(where <formula>
is the name of the formula that failed to build).
Formula Requests:
Please note by far the quickest way to get a new formula into Homebrew is to file a Pull Request.
We will consider your request but it may be closed if it’s something we’re not actively planning to work on.
macbookato:~ Katoo$ ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)»
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/…
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew…
You must: brew install git
You must: brew install git
Error: Git is unavailable
Failed during: /usr/local/bin/brew tap homebrew/core
macbookato:~ Katoo$
macbookato:~ Katoo$ brew install wget
You must: brew install git
You must: brew install git
You must: brew install git
You must: brew install git
Error: Git is unavailable
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
macbookato:~ Katoo$ brew update
You must: brew install git
You must: brew install git
Error: Git must be installed and in your PATH!
macbookato:~ Katoo$ brew update
You must: brew install git
You must: brew install git
Error: Git must be installed and in your PATH!
macbookato:~ Katoo$ brew doctor
You must: brew install git
You must: brew install git
You must: brew install git
You must: brew install git
Error: Git is unavailable
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
macbookato:~ Katoo$ brew edit $FORMULA
You must: brew install git
You must: brew install git
Error: Changes will be lost!
The first time you brew update', all local changes will be lost, you should thus
brew update’ before you brew edit'! macbookato:~ Katoo$ rew gist-logs <formula> -bash: syntax error near unexpected token
newline’
macbookato:~ Katoo$ brew install git
You must: brew install git
You must: brew install git
You must: brew install git
You must: brew install git
Error: Git is unavailable
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
macbookato:~ Katoo$ brew doctor
You must: brew install git
You must: brew install git
You must: brew install git
You must: brew install git
Error: Git is unavailable
Error: Failure while executing: /usr/local/bin/brew tap homebrew/core -q
macbookato:~ Katoo$
@Bazookato Can you give us more information on your environment? Which version of OS X do you use?
MacBookPro 2011 OS X 10.8.5
I tried «brew install git» but won’t work
Did you xcode-select --install
?
@ilovezfs We should probably detect that a little nicer, though and perhaps offer to xcode-select --install
.
macbookato:~ Katoo$ xcode-select —install
xcode-select: Error: unknown command option ‘—install’.
xcode-select: Report or change the path to the active
Xcode installation for this machine.
Usage: xcode-select —print-path
Prints the path of the active Xcode folder
or: xcode-select —switch <xcode_path>
Sets the path for the active Xcode folder
or: xcode-select —version
Prints the version of xcode-select
macbookato:~ Katoo$
That’s because --install
does not exist on 10.8. You should just download Xcode.app (Version 5.1.1 (5B1008)) from Apple. The command line tools are only optional if you have Xcode.app, and they can be installed directly from Xcode 5.1.1 if you happen to want them.
Guys, you are all very kind but I am lost as Alice in Wonderland. I actually landed here because Download Helper — Firefox Add-on — says I need to install a converter and linked me to your page:
http://www.downloadhelper.net/install-converter3.php
But I am a video editor and not a developer!!! ___
And of course I can’t manage to install that little converter…
You don’t need to be a developer to use brew, but you would need to install Xcode 5.1.1 from Apple.
I ran into this as well. I installed the CLI Tools and have git 1.8.5.2 (Apple Git-48) available on the system. Do I actually have to install the Xcode app? What’s different than just installing the CLI Tools?
@jmmk That should be enough. Your bug is different if CLI Tools are installed. Can you open a new issue?
@MikeMcQuaid I ended up writing it off as a failed experiment and upgrading to El Capitan.
Homebrew
locked and limited conversation to collaborators
May 4, 2018
This is a list of commonly encountered problems, known issues, and their solutions.
- Running
brew
brew
complains about absence of “Command Line Tools”- Ruby:
bad interpreter: /usr/bin/ruby^M: no such file or directory
- Ruby:
bad interpreter: /usr/bin/ruby
brew update
complains about untracked working tree fileslaunchctl
refuses to loadlaunchd
plist filesbrew upgrade
errors out- Python:
easy-install.pth
cannot be linked
- Installation fails with “unknown revision or path not in the working tree”
- Upgrading macOS
- Cask — cURL error
- If the download works
- If the download does not work
- Cask — checksum does not match
- Cask — permission denied
- Cask — source is not there
- Cask — wrong number of arguments
- Other local issues
Running brew
brew
complains about absence of “Command Line Tools”
You need to have the Xcode Command Line Utilities installed (and updated): run xcode-select --install
in the terminal.
Ruby: bad interpreter: /usr/bin/ruby^M: no such file or directory
You cloned with git
, and your Git configuration is set to use Windows line endings. See this page on configuring Git to handle line endings.
Ruby: bad interpreter: /usr/bin/ruby
You don’t have a /usr/bin/ruby
or it is not executable. It’s not recommended to let this persist; you’d be surprised how many .app
s, tools and scripts expect your macOS-provided files and directories to be unmodified since macOS was installed.
brew update
complains about untracked working tree files
After running brew update
, you receive a Git error warning about untracked files or local changes that would be overwritten by a checkout or merge, followed by a list of files inside your Homebrew installation.
This is caused by an old bug in in the update
code that has long since been fixed. However, the nature of the bug requires that you do the following:
cd "$(brew --repository)"
git reset --hard FETCH_HEAD
If brew doctor
still complains about uncommitted modifications, also run this command:
cd "$(brew --repository)/Library"
git clean -fd
launchctl
refuses to load launchd
plist files
When trying to load a plist file with launchctl
, you receive an error that resembles either:
Bug: launchctl.c:2325 (23930):13: (dbfd = open(g_job_overrides_db_path, [...]
launch_msg(): Socket is not connected
or:
Could not open job overrides database at: /private/var/db/launchd.db/com.apple.launchd/overrides.plist: 13: Permission denied
launch_msg(): Socket is not connected
These are likely due to one of four issues:
- You are using iTerm. The solution is to use Terminal.app when interacting with
launchctl
. - You are using a terminal multiplexer such as
tmux
orscreen
. You should interact withlaunchctl
from a separate Terminal.app shell. - You are attempting to run
launchctl
while logged in remotely. You should enable screen sharing on the remote machine and issue the command using Terminal.app running on that machine. - You are
su
‘ed as a different user.
brew upgrade
errors out
When running brew upgrade
, you see something like this:
Error: undefined method `include?' for nil:NilClass
Please report this bug:
https://docs.brew.sh/Troubleshooting
/usr/local/Library/Homebrew/formula.rb:393:in `canonical_name'
/usr/local/Library/Homebrew/formula.rb:425:in `factory'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7:in `map'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/bin/brew:46:in `require'
/usr/local/bin/brew:46:in `require?'
/usr/local/bin/brew:79
This happens because an old version of the upgrade command is hanging around for some reason. The fix:
cd "$(brew --repository)/Library/Contributions/examples"
git clean -n # if this doesn't list anything that you want to keep, then
git clean -f # this will remove untracked files
Python: easy-install.pth
cannot be linked
Warning: Could not link <formula>. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link <formula>'
Possible conflicting files are:
/usr/local/lib/python2.7/site-packages/site.py
/usr/local/lib/python2.7/site-packages/easy-install.pth
==> Could not symlink file: /homebrew/Cellar/<formula>/<version>/lib/python2.7/site-packages/site.py
Target /usr/local/lib/python2.7/site-packages/site.py already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
Don’t follow the advice here but fix by using
Language::Python.setup_install_args
in the formula as described in
Python for Formula Authors.
Installation fails with “unknown revision or path not in the working tree”
When installing Homebrew, if the initial download fails with something like:
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
or:
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
This is an issue in the connection between your machine and GitHub, rather than a bug in Homebrew itself. See this discussion topic for a number of solutions others have found, such as using a wired connection or a VPN, or disabling network monitoring tools.
Upgrading macOS
Upgrading macOS can cause errors like the following:
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.54.dylib
configure: error: Cannot find libz
Following a macOS upgrade it may be necessary to reinstall the Xcode Command Line Tools and then brew upgrade
all installed formulae:
xcode-select --install
brew upgrade
Cask — cURL error
First, let’s tackle a common problem: do you have a .curlrc
file? Check with ls -A ~ | grep .curlrc
(if you get a result, the file exists). Those are a frequent cause of issues of this nature. Before anything else, remove that file and try again. If it now works, do not open an issue. Incompatible .curlrc
configurations must be fixed on your side.
If, however, you do not have a .curlrc
or removing it did not work, let’s see if the issue is upstream:
- Go to the vendor’s website (
brew home <cask_name>
). - Find the download link for the app and click on it.
If the download works
The cask is outdated. Let’s fix it:
- Look around the app’s website and find out what the latest version is. It may be expressed in the URL used to download it.
- Take a look at the cask’s version (
brew info <cask_name>
) and verify it is indeed outdated. If the app’s version is:latest
, it means theurl
itself is outdated. It will need to be changed to the new one.
Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.
If the download does not work
The issue isn’t in any way related to Homebrew Cask, but with the vendor or your connection.
Start by diagnosing your connection (try to download other casks, or browse around the web). If the problem is with your connection, try a website like Ask Different to ask for advice.
If you’re sure the issue is not with your connection, contact the app’s vendor and let them know their link is down, so they can fix it.
Do not open an issue.
Cask — checksum does not match
First, check if the problem was with your download. Delete the downloaded file (its location will be pointed out in the error message) and try again.
If the problem persists, the cask must be outdated. It’ll likely need a new version, but it’s possible the version has remained the same (this happens occasionally when the vendor updates the app in-place).
- Go to the vendor’s website (
brew home <cask_name>
). - Find out what the latest version is. It may be expressed in the URL used to download it.
- Take a look at the cask’s version (
brew info <cask_name>
) and verify it is indeed outdated. If so, it will need to be updated.
Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.
Cask — permission denied
In this case, it’s likely your user account has no admin rights and therefore lacks permissions for writing to /Applications
, which is the default install location. You can use --appdir
to choose where to install your applications.
If --appdir
doesn’t fix the issue or you do have write permissions to /Applications
, verify you’re the owner of the Caskroom
directory by running ls -dl "$(brew --prefix)/Caskroom"
and checking the third field. If you are not the owner, fix it with sudo chown -R "$(whoami)" "$(brew --prefix)/Caskroom"
. If you are, the problem may lie in the app bundle itself.
Some app bundles don’t have certain permissions that are necessary for us to move them to the appropriate location. You may check such permissions with ls -ls '/path/to/application.app'
. If you see something like dr-xr-xr-x
at the start of the output, that may be the cause. To fix it, we need to change the app bundle’s permission to allow us to move it, and then set it back to what it was (in case the developer set those permissions deliberately). See litecoin.rb for an example of such a cask.
Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.
Cask — source is not there
First, you need to identify which artifact is not being handled correctly anymore. It’s explicit in the error message: if it says It seems the App source…'
then the problem is with the app
stanza. This pattern is the same across all artifacts.
Fixing this error is typically easy, and requires only a bit of time on your part. Start by downloading the package for the cask: brew fetch <cask_name>
. The last line of output will inform you of the location of the download. Navigate there and manually unpack it. As an example, let’s say the structure inside the archive is as follows:
.
├─ Files/SomeApp.app
├─ Files/script.sh
└─ README.md
Now, if we find this when looking at the cask with brew cat <cask_name>
:
(…)
app "SomeApp.app"
(…)
The cask expects SomeApp.app
to be in the top directory of the archive (see how it says simply SomeApp.app
) but the developer has since moved it to be inside a Files
directory. All we have to do is update that line of the cask to follow the new structure: app "Files/SomeApp.app"
.
Note that occasionally the app’s name changes completely (from SomeApp.app
to OtherApp.app
, let’s say). In these instances, the filename of the cask itself, as well as its token, must also change. Consult the token reference
for complete instructions on the new name.
Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.
Cask — wrong number of arguments
Make sure the issue really lies with your macOS version. To do so, try to install the software manually. If it is incompatible with your macOS version, it will tell you. In that case, there is nothing we can do to help you install the software, but we can add a depends_on macos:
stanza to prevent the cask from being installed on incompatible macOS versions.
Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.
Other local issues
If your Homebrew installation gets messed up (and fixing the issues found by brew doctor
doesn’t solve the problem), reinstalling Homebrew may help to reset to a normal state. To easily reinstall Homebrew, use Homebrew Bundle to automatically restore your installed formulae and casks. To do so, run brew bundle dump
, uninstall, reinstall and run brew bundle install
.