What does this mean? Some installed kegs have no formulae - homebrew

I see this after typing in "brew doctor"
Warning: Some installed kegs have no formulae! This means they were
either deleted or installed with brew diy. You should find
replacements for the following formulae:
python#2
What does this mean and how do I fix it?

It's just a warning, as most "brew doctor" messages are. Python 2 is dead. You can remove it with brew uninstall python#2.

Related

How should I overwrite/replace nmap, when there are two copies of the same version present?

I recently reinstalled nmap using brew, which, I guess, has caused some conflict with the pre-existing one. So just running nmap gives a -bash: /usr/local/bin/nmap: error.
Ran brew doctor to diagnose the issue and came up with this:
Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run 'brew link' on these: nmap
Warning: Broken symlinks were found. Remove them with 'brew cleanup': /usr/local/share/man/man1/brew-cask.1
I tried running brew link --overwrite nmap
but gives me error: Could not symlink share/man/es/man1/nmap.1 Target /usr/local/share/man/es/man1/nmap.1 already exists. You may want to remove it: rm '/usr/local/share/man/es/man1/nmap.1'
Any help would be appreciated,
Thanks.
You can just follow the indications given by brew doctor by running:
rm '/usr/local/share/man/es/man1/nmap.1'
then
brew link --overwrite nmap

Homebrew aspell directory not writable

I am having some difficulties. This started with a broader question but I seem (with some help from this list) to have narrowed things down a bit. My original query is at Emacs - Kieran Healy's Emacs Starter Kit aspell English dictionery
(And, yes, I am embarrassed at the spelling error in the title).
I have narrowed (with some help from that question) to narrow my problem down to the Homebrew installation of aspell. The command brew install aspell gives the following error.
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink lib/aspell-0.60/american-variant_0.alias
/usr/local/lib/aspell-0.60 is not writable.
You can try again using:
brew link aspell
If I try brew link aspell I get the following error:
Linking /usr/local/Cellar/aspell/0.60.6.1_1...
Error: Could not symlink lib/aspell-0.60/american-variant_0.alias
/usr/local/lib/aspell-0.60 is not writable.
File permissions on aspell are
drwxr-xr-x 89 root wheel 2848 7 Nov 2016 aspell-0.60
brew doctor gives
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that
depend on
those kegs to fail to run properly once built. Run `brew link` on
these:
aspell
It also tells me I need to update from XCode 9.3 to XCode 10.1, but since I am still running MacOS 10.13.4, I think I do not need to do this.
Any help greatly appreciated.
The info at Homebrew: Could not symlink, /usr/local/bin is not writable was helpful. I had to sudo chown -Rwhoami:admin /usr/local/lib. Then after unintalling and reinstalling aspell with Homebrew, I had to brew link --overwrite aspell. Everything works now.

Warnings when running meld on Mac OS X Sierra

I've installed homebrew on my machine. Using brew I've installed meld. When I run it with git I get the following error:
Couldn't bind the translation domain. Some translations won't work.
'module' object has no attribute 'bindtextdomain'
2016-10-20 10:14:08.422 Python[22212:158273] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
(meld:22212): Gdk-WARNING **: GdkQuartzDisplay does not implement the monitor vfuncs
I don't understand how exactly brew works. In fact I never dug into its code, used it only to (un)install the software.
Did some online searches but there doesn't seem to be a solution to this. Has anyone figured it out?
Homebrew is simply a a package manager for MacOS. Unlike Linux, Mac doesn't always have all the external libraries you may need for things like wget, pip, etc out of the box. Homebrew tries to bridge this gap.
As for troubleshooting your issue, following Homebrew's troubleshooting steps helped me... You are probably just stuck in dependency hell, since Homebrew integrates alot of its libraries with Xcode (for me it was needing to update Xcode to latest): https://github.com/Homebrew/brew/blob/master/docs/Troubleshooting.md#troubleshooting
It's really important to keep thing up-to-date with brew update and then running brew doctor and brew prune resolved alot of issues for me as well.
If all else fails, homebrew seemed to have moved the meld formulae from homebrew/core to caskroom/cask. So I recall having to run the following command after running brew doctor and updating Xcode:
$ brew uninstall meld
$ brew install meld
Error: No available formula with the name "meld"
It was migrated from homebrew/core to caskroom/cask.
You can access it again by running:
brew tap caskroom/cask
$ brew tap caskroom/cask
$ brew cask install meld
==> Downloading https://github.com/yousseb/meld/releases/download/osx-9/meldmerge.dmg
######################################################################## 100.0%
==> Verifying checksum for Cask meld
==> Moving App 'Meld.app' to '/Applications/Meld.app'.
==> Linking Binary 'Meld' to '/usr/local/bin/meld'.
🍺 meld was successfully installed!

Homebrew failed to link libmpc

After
brew install libmpc
I got an error
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 libmpc'
Then I run
brew doctor
and I got
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these: `libmpc`
So I run
brew link libmpc
and I got
Error: Could not symlink file: /usr/local/Cellar/libmpc/1.0.1/lib/libmpc.dylib
/usr/local/lib/libmpc.dylib may already exist.
/usr/local/lib may not be writable.
What should I do?
Try to clean up old homebrew files:
brew cleanup

gfortran error while installing using homebrew

Any help with this problem which I faced while trying gfortran using homebrew. Thank you very much in advance.
bash-3.2$ brew install gfortran
Warning: gfortran-4.8.0 already installed, it's just not linked
bash-3.2$ brew link gfortran
Linking /usr/local/Cellar/gfortran/4.8.0... Warning: Could not link gfortran. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/gfortran/4.8.0/share/gcc-4.8.0/python
/libstdcxx/v6/printers.py
Target /usr/local/share/gcc-4.8.0/python/libstdcxx/v6/printers.py already exists.
You may need to delete it.
To force the link and delete this file, do:
brew link --overwrite formula_name
To list all files that would be deleted:
brew link --overwrite --dry-run formula_name
bash-3.2$
This looks like another GCC 4.8 installation, either from Homebrew or elsewhere, is conflicting with the gfortran install. GFortran is based on GCC so they can collide.
The gcc48 Homebrew formula looks like it has an undocumented conflict with gfortran. Both want to symlink /usr/local/share/gcc-4.8.0. I was able to reproduce your error with brew tap homebrew/versions; brew install gcc48; brew install gfortran
Head on over to the Homebrew issue tracker on GitHub and report this conflict as a bug.
As a workaround, if you don't need that GCC 4.8.0, either brew unlink gcc48 (if it's from homebrew) or uninstall it, and then try the gfortran install again.
UPDATE: Looks like the Homebrew folks are already aware of this issue. There is a fix for it included in this pull request (#19382).

Resources