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

brew install cabal-install failure #14227

Closed
jlopez opened this issue Aug 16, 2012 · 4 comments
Closed

brew install cabal-install failure #14227

jlopez opened this issue Aug 16, 2012 · 4 comments

Comments

@jlopez
Copy link
Contributor

jlopez commented Aug 16, 2012

brew install -v cabal-install output here

Error seems to point at invalid processing directives in file Data/Text.hs downloaded by the cabal bootstrap script:

Data/Text.hs:1053:4:
     error: invalid preprocessing directive
      #-}
       ^

brew doctor reports system is raring to brew.

@jlopez
Copy link
Contributor Author

jlopez commented Aug 16, 2012

I ran into an earlier problem (with brew install lesstif) with Mountain Lion's regexp libraries honoring of LC_CTYPE env var. LANG is by default set to en_US.UTF-8, so regex's now complains with RE error: illegal byte sequence if the source file contains any malformed UTF-8 (e.g. try echo $'\x80' |sed /./p). This can be worked around by setting LC_CTYPE=C.

So I uninstalled ghc, cabal-install, and rm -fr ~/.ghc. Then doing LANG=C brew install cabal-install worked like a charm. Will try again to see if the problem was with the installation of ghc or with cabal-install itself...

@MikeMcQuaid
Copy link
Member

We fixed the sed issue in Homebrew itself. Did you brew update recently?

@jlopez
Copy link
Contributor Author

jlopez commented Aug 16, 2012

Oh, good to know the sed issue was fixed. However, I found the problem, it wasn't a LANG issue.

I had done brew update, but only after installing ghc (which installed without errors) and before installing cabal-install. Then I incorrectly attributed the fix to having set LANG, when instead this is what fixed the problem (tested on a fresh machine where the problem reproduced):

brew update          # affc4c8 -> bf4f9aa
brew uninstall ghc
brew install cabal-install

@jlopez jlopez closed this as completed Aug 16, 2012
@pyrtsa
Copy link

pyrtsa commented Aug 12, 2013

I think this issue should be reconsidered. I had troubles with the same error last weekend, found an interim solution to it (different from the one above; that didn't work for me!), but I'm not sure where this should be fixed: https://gist.github.com/pyrtsa/6213784

What do you think?

@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

3 participants