Closed CodingAnarchy closed 8 years ago
To be clear, the links are still there, Homebrew just does not detect them as expected, and will not overwrite them with the next version because the files therefore conflict.
what's the output of brew config
I have this problem too! Here is my config.
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 10f2bc2deabad58c4f6b80481ccc913faeb85510
Last commit: 2 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 997786abfaca083c6daee1802f1c45588ed0fbbc
Core tap last commit: 84 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit sandybridge
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.10.0 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.3.1/bin/ruby
Java: N/A
OS X: 10.11.6-x86_64
Xcode: 8.0
CLT: 7.3.1.0.1.1461711523
X11: 2.7.9 => /opt/X11
Can I see a symlink example with ls -lha $SYMLINK
before and after running brew link --overwrite
? Thanks!
What value should I be using for $SYMLINK?
Anything under:
Possible conflicting files are:
/usr/local/bin/yara -> /usr/local/Cellar/yara/3.5.0/bin/yara
e.g. /usr/local/bin/yara
in that case
Like this?
Alex@Alex-Kornitzers-MacBook-Pro ~ $ ls -lha /usr/local/bin/yara
lrwxr-xr-x 1 Alex admin 29B 6 Aug 12:21 /usr/local/bin/yara -> ../Cellar/yara/3.5.0/bin/yara
Alex@Alex-Kornitzers-MacBook-Pro ~ $ brew link --overwrite yara
Linking /usr/local/Cellar/yara/3.5.0... 23 symlinks created
Alex@Alex-Kornitzers-MacBook-Pro ~ $ ls -lha /usr/local/bin/yara
lrwxr-xr-x 1 Alex admin 29B 6 Aug 12:21 /usr/local/bin/yara -> ../Cellar/yara/3.5.0/bin/yara
Yes, thanks. Can I also see ls -lha /usr/local/Library/LinkedKegs/yara
?
Ideally if you can reproduce: can I see the ls -lha
before you had to run any brew link --overwrite
i.e. when it's failed and before you've fixed it?
So the yara example was a before and after.
Overwriting seems to fix the issue, doctor no longer complains about yara. Is there a way to relink everything?
Actually, I think I know the (temporary): fix for both of you run brew update --force
and see if that fixes things?
So I hit this road block:
Alex@Alex-Kornitzers-MacBook-Pro ~ $ brew update --force
Error: Cannot link android-platform-tools
Another version is already linked: /usr/local/Cellar/android-platform-tools/24
Which is odd because doctor is not complaining about that keg.
Can I see brew update --force --debug
's output? There will be a lot so stick in a Gist.
Here we go: https://gist.github.com/AlexKornitzer/a96e7c44591fa0bb9dac4280bed404fa
Also for future reference how do I pipe output to a file > did not work?
Sat Sep 17 12:35:43 BST 2016
brew update --force --debug 2>&1 | tee /tmp/brew-up-force-debug.l0g
Ah stderr redirect thanks :)
Should be fixed now after a brew update --force
or two.
Okay, so I have run force update 3 times and hit no errors, but I am still suffering from the symlink issue.
You may have had a partial migration which was :sob:. Try to brew unlink $(brew list); brew link $(brew list)
if that still fails try brew unlink $(brew list); brew link --overwrite $(brew list)
Success, thanks for resolving that so quickly 🎉 🎉 🎉
@CodingAnarchy @AlexKornitzer thanks for reporting this!!!
Please follow the general troubleshooting steps first:
brew update
and retried your prior step?brew doctor
, fixed as many issues as possible and retried your prior step?Bug reports:
Formulas fail to link automatically, requiring a brew link --overwrite $FORMULA to force them to link. Which is fine for one or two, if there is some specific issue, but not for all of the installed tools upon an update. Many formulae that were not upgraded also have links that are not being detected any longer.
The output from the sequence of commands I ran last (
brew upgrade
andbrew doctor
):brew update
also results in this output, which may be related: