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

You have unlinked kegs in your Cellar / libiconv #11050

Closed
oschrenk opened this issue Mar 19, 2012 · 11 comments
Closed

You have unlinked kegs in your Cellar / libiconv #11050

oschrenk opened this issue Mar 19, 2012 · 11 comments

Comments

@oschrenk
Copy link
Contributor

brew doctor warns me about an unlinked keg libiconv. I tried unlinking it but it gives me the error No available formula for libiconv. Installing it doesn't work as it is distributed with OSX.

Can anyone tell me what this means?

PS
I stumbled upon the problem after I tried upgrading subversion, which failed because of unlinked pkg-config. Running brew doctor listed many warnings for unlinked kegs, which all could be solved by unlinking and linking them again. Only libiconv is stubborn.

@mxcl
Copy link
Contributor

mxcl commented Mar 19, 2012

So you sure you did: brew unlink libiconv? Because the error message you specified is impossible for that command. Why are you unlinking anyway? You should be linking. It says they are unlinked.

mxcl added a commit that referenced this issue Mar 19, 2012
If the link already exists exactly (well almost exactly) as we are about to correct it, then it's okay. Otherwise we error out. This is a safe choice, and really, the correct choice too.

This will prevent the tickets like #11050 from occurring.
@oschrenk
Copy link
Contributor Author

Yes, I'm sure.

Both link and unlink give me

 Error: No available formula for libiconv 

I was unlinking the kegs first as homebrew threw erors at me that the path it tried to create symlinks at already existed, so I "re"-linked them.

Here is the output of 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.

    libiconv

Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path. Please note that there is no correct
path at this time if you have *only* installed the Command Line Tools for Xcode.
If your Xcode is pre-4.3 or you installed the whole of Xcode 4.3 then one of
these is (probably) what you want:

    sudo xcode-select -switch /Developer
    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

My env:
sw_vers | grep 'ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*' = 10.7.3
brew --version = 0.9

@oschrenk
Copy link
Contributor Author

Just saw your commit 4571077 and updated. I still get the warning from doctor and the error for link and unlink

@mxcl
Copy link
Contributor

mxcl commented Mar 19, 2012

brew update && brew link libiconv

@mxcl
Copy link
Contributor

mxcl commented Mar 19, 2012

Please specify the exact command you are typing. Please provide the output with --debug.

@oschrenk
Copy link
Contributor Author

$ brew update --debug
Already up-to-date.

$ brew log -1 --format="%H"
37a3f7ce4f287fbf6ec9e0fbe10955d029c98f5d

$ brew link --debug libiconv
Error: No available formula for libiconv 
/usr/local/Library/Homebrew/formula.rb:362:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:39:in `kegs'
/usr/local/Library/Homebrew/extend/ARGV.rb:21:in `collect'
/usr/local/Library/Homebrew/extend/ARGV.rb:21:in `kegs'
/usr/local/Library/Homebrew/cmd/link.rb:12:in `link'
/usr/local/bin/brew:83:in `send'
/usr/local/bin/brew:83

$ brew link --debug libiconv
Error: No available formula for libiconv 
/usr/local/Library/Homebrew/formula.rb:362:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:39:in `kegs'
/usr/local/Library/Homebrew/extend/ARGV.rb:21:in `collect'
/usr/local/Library/Homebrew/extend/ARGV.rb:21:in `kegs'
/usr/local/Library/Homebrew/cmd/link.rb:12:in `link'
/usr/local/bin/brew:83:in `send'
/usr/local/bin/brew:83

$ brew install --debug libiconv
Error: No available formula for libiconv
Apple distributes libiconv with OS X, you can find it in /usr/lib.
Some build scripts fail to detect it correctly, please check existing
formulae for solutions.
/usr/local/Library/Homebrew/cmd/install.rb:11:in `install'
/usr/local/Library/Homebrew/cmd/install.rb:9:in `each'
/usr/local/Library/Homebrew/cmd/install.rb:9:in `install'
/usr/local/bin/brew:83:in `send'
/usr/local/bin/brew:83

@mxcl
Copy link
Contributor

mxcl commented Mar 19, 2012

ls -la /usr/local/Cellar/libiconv

@oschrenk
Copy link
Contributor Author

$ ls -la /usr/local/Cellar/libiconv
total 0
drwxr-xr-x+  4 Oliver  staff   136 21 Sep 12:31 .
drwxr-xr-x+ 85 Oliver  staff  2890 19 Mär 11:49 ..
drwxr-xr-x+ 10 Oliver  staff   340 22 Aug  2011 1.13.1
drwxr-xr-x+ 10 Oliver  staff   340 21 Sep 12:32 1.14

@mxcl
Copy link
Contributor

mxcl commented Mar 19, 2012

K, I see the problem, thanks for the report, fix coming!

Sadly because the formula was deleted, your only option is to delete the 1.13.1 version manually from the Cellar. Apologies, I know this is dumb.

@mxcl
Copy link
Contributor

mxcl commented Mar 19, 2012

@adamv, @MikeMcQuaid, @jacknagel, @Sharpie, @mistydemeo

This situation shows how naive Homebrew is about this sort of thing. We need to stop relying on the formula itself as the definition of keg state.

mxcl added a commit that referenced this issue Mar 19, 2012
In this case the user will simply have to delete all but one keg in order to use the command that uses ARGV.kegs.

Refs #11050.
@mxcl mxcl closed this as completed Mar 19, 2012
@oschrenk
Copy link
Contributor Author

No need to apologize.

Thanks for homebrew!

staticfloat pushed a commit to staticfloat/homebrew that referenced this issue Mar 26, 2012
If the link already exists exactly (well almost exactly) as we are about to correct it, then it's okay. Otherwise we error out. This is a safe choice, and really, the correct choice too.

This will prevent the tickets like Homebrew#11050 from occurring.
staticfloat pushed a commit to staticfloat/homebrew that referenced this issue Mar 26, 2012
In this case the user will simply have to delete all but one keg in order to use the command that uses ARGV.kegs.

Refs Homebrew#11050.
Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Jun 18, 2012
If the link already exists exactly (well almost exactly) as we are about to correct it, then it's okay. Otherwise we error out. This is a safe choice, and really, the correct choice too.

This will prevent the tickets like Homebrew#11050 from occurring.
Sharpie pushed a commit to Sharpie/homebrew that referenced this issue Jun 18, 2012
In this case the user will simply have to delete all but one keg in order to use the command that uses ARGV.kegs.

Refs Homebrew#11050.
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
If the link already exists exactly (well almost exactly) as we are about to correct it, then it's okay. Otherwise we error out. This is a safe choice, and really, the correct choice too.

This will prevent the tickets like Homebrew#11050 from occurring.
snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
In this case the user will simply have to delete all but one keg in order to use the command that uses ARGV.kegs.

Refs Homebrew#11050.
@Homebrew Homebrew locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants