Skip to content
This repository has been archived by the owner. It is now read-only.

'brew install' fails after 'brew update' (Homebrew 0.9.5) for Library/Aliases/* #36706

Closed
pranavcode opened this issue Feb 10, 2015 · 4 comments

Comments

@pranavcode
Copy link

@pranavcode pranavcode commented Feb 10, 2015

Hi Brewer,

(Please consider reading updates added at end, thanks!)

I was in process of installing openmpi using Homebrew and during that encountered several curlspecific errors (one example of which, fresh from my terminal, while upgrading git).

So, after little search into the community conversations, I figured that this bug was due to curl, which brew was dependent on. I upgraded curl. Current curl version:

$ curl --version
curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz

I also updated brew (I guess, I should have not done this without checking if updated curl works with older brew installation).

$ brew update
Initialized empty Git repository in /usr/local/.git/
remote: Counting objects: 230612, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 230612 (delta 25), reused 10 (delta 7)
Receiving objects: 100% (230612/230612), 53.09 MiB | 333.00 KiB/s, done.
Resolving deltas: 100% (168755/168755), done.
From https://github.com/Homebrew/homebrew
 * [new branch]      master     -> origin/master
 * [new branch]      gh-pages   -> origin/gh-pages
 * [new branch]      go         -> origin/go
HEAD is now at 4a4ecc0 apache-spark 1.2.1
Already up-to-date.

Also called for Dr. Brew

$ brew doctor
Your system is ready to brew.

Homebrew’s version is

$ brew --version
0.9.5

And now tried re-installing openmpi

$ brew install openmpi
Error: /usr/local/Library/Aliases/openmpi:1: syntax error, unexpected ..
../Formula/open-mpi.rb
  ^
/usr/local/Library/Aliases/openmpi:1: unknown regexp option - p
Please report this bug:
    http://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:92:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:71:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:200:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:42:in `install'
/usr/local/Library/brew.rb:135:in `<main>’

(brew gist-logs openmpi gives the same output as above, so no special gist was created.)

UPDATE 1
I missed on the sf.net's issue for curl. But, I don't think current error for brew install is reaching that stage, so --build-from-source option will not help.

UPDATE 2
Only happens for packages with package specific Formula location files under Library/Aliases/.

UPDATE 3
Adding configuration details

$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 4a4ecc0460baec04ec895500ff11d26aa2582b16
Last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit haswell
OS X: 10.10.1-x86_64
Xcode: N/A
CLT: 6.1.1.0.1.1416017670
Clang: 6.0 build 600
X11: N/A
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby
Java: N/A
@pranavcode pranavcode changed the title *brew install* fails after *brew update* 'brew install' fails after 'brew update' (latest code) Feb 10, 2015
@pranavcode pranavcode changed the title 'brew install' fails after 'brew update' (latest code) 'brew install' fails after 'brew update' (Homebrew 0.9.5) Feb 10, 2015
@pranavcode pranavcode changed the title 'brew install' fails after 'brew update' (Homebrew 0.9.5) 'brew install' fails after 'brew update' (Homebrew 0.9.5) for Library/Aliases/* Feb 10, 2015
@tdsmith

This comment has been minimized.

Copy link
Contributor

@tdsmith tdsmith commented Feb 10, 2015

If you haven't made local changes that you'd like to keep, can you cd /usr/local && git reset --hard origin/master and see if it's resolved? That will throw out any local changes. Be careful not to run it in any git repo that has changes you want to keep.

@pranavcode

This comment has been minimized.

Copy link
Author

@pranavcode pranavcode commented Feb 10, 2015

I ran cd /usr/local && git reset --hard origin/master and tried installing openmpi again, but, no luck.

$ cd /usr/local && git reset --hard origin/master
HEAD is now at 4a4ecc0 apache-spark 1.2.1

(Is the above output expected?)

$ brew install openmpi
Error: /usr/local/Library/Aliases/openmpi:1: syntax error, unexpected ..
../Formula/open-mpi.rb
  ^
/usr/local/Library/Aliases/openmpi:1: unknown regexp option - p
Please report this bug:
    http://git.io/brew-troubleshooting
/usr/local/Library/Homebrew/formulary.rb:92:in `module_eval'
/usr/local/Library/Homebrew/formulary.rb:92:in `load_file'
/usr/local/Library/Homebrew/formulary.rb:82:in `klass'
/usr/local/Library/Homebrew/formulary.rb:71:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:200:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:16:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:42:in `install'
/usr/local/Library/brew.rb:135:in `<main>'
@tdsmith

This comment has been minimized.

Copy link
Contributor

@tdsmith tdsmith commented Feb 10, 2015

It looks like /usr/local/Library/Aliases/openmpi is a file containing the literal value "../Formula/open-mpi.rb" instead of a symlink to ../Formula/open-mpi.rb. If you have core.symlinks set to false in your git configuration you'll need to set it to true and checkout master again for the alias feature to work.

@pranavcode

This comment has been minimized.

Copy link
Author

@pranavcode pranavcode commented Feb 10, 2015

Thanks @tdsmith, it worked! 👍

You were right, the core.symlink was set to false, I set it to true and did checkout master. Also, brew doctor found few links to prune and I got rid of them using brew prune. And installation happened successfully (for now using brew install openmpi --build-from-sources).

Closing the issue.

@pranavcode pranavcode closed this Feb 10, 2015
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.