Skip to content
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

Broken symlink detection needed #26

Closed
kas-kad opened this issue Apr 5, 2016 · 4 comments
Closed

Broken symlink detection needed #26

kas-kad opened this issue Apr 5, 2016 · 4 comments
Labels
bug Reproducible Homebrew/brew bug usability Usability of Homebrew/brew

Comments

@kas-kad
Copy link

kas-kad commented Apr 5, 2016

Suddenly got this error today

brew install git
Error: pathname contains null byte
Please report this bug:
    https://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/extend/pathname.rb:337:in `initialize'
/usr/local/Library/Homebrew/extend/pathname.rb:337:in `readlink'
/usr/local/Library/Homebrew/extend/pathname.rb:337:in `resolved_path'
/usr/local/Library/Homebrew/tab.rb:100:in `for_formula'
/usr/local/Library/Homebrew/formula_installer.rb:365:in `effective_build_options_for'
/usr/local/Library/Homebrew/formula_installer.rb:315:in `block in expand_requirements'
/usr/local/Library/Homebrew/requirement.rb:215:in `block in prune?'
/usr/local/Library/Homebrew/requirement.rb:213:in `catch'
/usr/local/Library/Homebrew/requirement.rb:213:in `prune?'
/usr/local/Library/Homebrew/requirement.rb:201:in `block (2 levels) in expand'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/set.rb:232:in `each_key'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/set.rb:232:in `each'
/usr/local/Library/Homebrew/dependencies.rb:68:in `each'
/usr/local/Library/Homebrew/requirement.rb:200:in `block in expand'
/usr/local/Library/Homebrew/requirement.rb:199:in `each'
/usr/local/Library/Homebrew/requirement.rb:199:in `expand'
/usr/local/Library/Homebrew/formula.rb:1226:in `recursive_requirements'
/usr/local/Library/Homebrew/formula_installer.rb:314:in `expand_requirements'
/usr/local/Library/Homebrew/formula_installer.rb:264:in `compute_dependencies'
/usr/local/Library/Homebrew/formula_installer.rb:129:in `verify_deps_exist'
/usr/local/Library/Homebrew/formula_installer.rb:122:in `prelude'
/usr/local/Library/Homebrew/cmd/install.rb:213:in `install_formula'
/usr/local/Library/Homebrew/cmd/install.rb:93:in `block in install'
/usr/local/Library/Homebrew/cmd/install.rb:93:in `each'
/usr/local/Library/Homebrew/cmd/install.rb:93:in `install'
/usr/local/Library/brew.rb:84:in `<main>'

the reason was an occasional symlink among the pathnames which was pointing to nothing.
I've fixed it by removing the symlink
It would be nice to have proper handling for this case.

@MikeMcQuaid
Copy link
Member

Sorry but you have not followed the requested steps on the Troubleshooting page: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Troubleshooting.md#troubleshooting

Please follow (all of) these steps and post the information here so we can help you with your problem. Additionally, what was the symlink?

Thanks!

@kas-kad
Copy link
Author

kas-kad commented Apr 5, 2016

My problem is solved. You can close the issue. Just wanted to let you know about the issue with pathnames handling because the error message Error: pathname contains null byte doesn't say anything to brew user and the brew doctor doesn't fix the issue. The symlink had something about maven.

@ilovezfs
Copy link
Contributor

ilovezfs commented Apr 6, 2016

Can't reproduce this issue but we'll keep an eye out for it.

@ilovezfs ilovezfs closed this as completed Apr 6, 2016
@apjanke
Copy link
Contributor

apjanke commented Apr 6, 2016

Do you remember where the symlink was and where it was pointing?

@UniqMartin UniqMartin added bug Reproducible Homebrew/brew bug usability Usability of Homebrew/brew labels Apr 17, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug usability Usability of Homebrew/brew
Projects
None yet
Development

No branches or pull requests

5 participants