Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Unlinked kegs (multiple) #21888

Closed
shammellee opened this issue Aug 14, 2013 · 12 comments
Closed

Unlinked kegs (multiple) #21888

shammellee opened this issue Aug 14, 2013 · 12 comments

Comments

@shammellee
Copy link
Contributor

$ brew update

Already up-to-date.

$ brew doctor

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:

    git
Error: Failed to import: acorn
No available formula for acorn
Error: Failed to import: adapter
No available formula for adapter
Error: Failed to import: airfoil
No available formula for airfoil
...
No available formula for zotero

$ brew link acorn

Error: No such keg: /usr/local/Cellar/acorn

@samueljohn
Copy link
Contributor

Can you brew rm acorn, brew rm adapter and brew rm airfoil etc.? These are not from Homebrew directly. If you need temp brew tap --repair and/or brew tap <whichevertaptheycamefrom> and try to install anew.

@samueljohn
Copy link
Contributor

can you perhaps la $(brew --prefix)/Cellar/acorn/? Perhaps there is a hidden file?

@shammellee
Copy link
Contributor Author

$ brew rm acorn
Error: No such keg: /usr/local/Cellar/acorn

$ ls $(brew --prefix)/Cellar/acorn/
ls: /usr/local/Cellar/acorn/: No such file or directory

@samueljohn
Copy link
Contributor

Ok. then there are no kegs. Some tab where acorn etc. are from is playing bad here. Try to brew tap --repair and if that is not okay list your taps by brew tap and perhaps brew untap <offendingtap>.

@shammellee
Copy link
Contributor Author

$ brew tap --repair

Pruned 0 dead formula
Tapped 1 formula

$ brew tap
phinze/cask

$ brew untap phinze/cask
Untapped 1 formula

$ brew doctor

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and...

@samueljohn
Copy link
Contributor

hmmm...
I'd say, you can also manually delete the offending kegs rm -r $(brew --prefix)/Cellar/<nameofkeg>.

I see that the keg git is from homebrew-core. So can you brew link git? Are there any other kegs left?

The errors about "cannot import <formula" that some formulae from https://github.com/phinze/homebrew-cask/issues show is not our affair, and I'd to redirect you to cask for this.

But the "unlinked kegs" warning should go away if you brew link git.

@shammellee
Copy link
Contributor Author

the "offending kegs" don't exist in $(brew --prefix)/Cellar/<nameofkeg>

$ brew link git

Linking /usr/local/Cellar/git/1.8.3.4... Warning: Could not link git. Unlinking...

Error: Could not symlink file: /usr/local/Cellar/git/1.8.3.4/lib/python2.7/site-packages/git_remote_helpers-0.1.0-py2.7.egg-info
Target /usr/local/lib/python2.7/site-packages/git_remote_helpers-0.1.0-py2.7.egg-info 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

$ brew link --overwrite git

Linking /usr/local/Cellar/git/1.8.3.4... 218 symlinks created

$ brew doctor

Error: Failed to import: acorn
No available formula for acorn
Error: Failed to import: adapter
No available formula for adapter
...
Your system is ready to brew.

@samueljohn
Copy link
Contributor

brew link --overwrite git is perfectly fine in this case (so just in case you worried).
Your system looks good now and the "failed to import" should be reported to https://github.com/phinze/homebrew-cask/issues. Thanks!

@shammellee
Copy link
Contributor Author

Awesome. Thanks!

@jayshen
Copy link

jayshen commented Sep 11, 2013

Hi I have a similar problem and followed the steps but still the issue remains. Please advise.

$ brew install git
==> Downloading http://git-core.googlecode.com/files/git-1.8.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-1.8.4.tar.gz
==> make prefix=/usr/local/Cellar/git/1.8.4 sysconfdir=/usr/local/etc CC=cc CFLAGS= L
==> make CC=cc CFLAGS= LDFLAGS=
==> make clean
==> make CC=cc CFLAGS= LDFLAGS=
==> Downloading http://git-core.googlecode.com/files/git-manpages-1.8.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-manpages-1.8.4.tar.gz
==> Downloading http://git-core.googlecode.com/files/git-htmldocs-1.8.4.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-htmldocs-1.8.4.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain

The 'contrib' directory has been installed to:
/usr/local/share/git-core/contrib

Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completion has been installed to:
/usr/local/share/zsh/site-functions
Warning: Could not link git. 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 git'

Possible conflicting files are:
Warning: Could not link git. Unlinking...
Error: File exists - /usr/local/etc

$ brew link --overwrite git
Warning: Could not link git. Unlinking...
Linking /usr/local/Cellar/git/1.8.4...
Error: File exists - /usr/local/etc

@raxan
Copy link

raxan commented Oct 5, 2014

same here, what to do?

me-imac:~ me$ brew link --overwrite git
Linking /usr/local/Cellar/git/2.1.2...
Error: Could not symlink share/git-core/contrib
/usr/local/share/git-core is not writable.
me-imac:~ me$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

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:

git

@tdsmith
Copy link
Contributor

tdsmith commented Oct 5, 2014

sudo chown -R $(whoami) /usr/local/share and then brew link git. Please open a new issue if you continue to have problems.

@Homebrew Homebrew locked and limited conversation to collaborators Oct 5, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants