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

Fix: sed: RE error: illegal byte sequence #21

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
9 participants
@DAddYE
Copy link

DAddYE commented Apr 23, 2012

This commit fix the problem with:

chmod 644 /usr/local/Cellar/vim/HEAD/share/vim/vim73/tools/*
perlpath=`./which.sh perl` && sed -e "s+/usr/bin/perl+$perlpath+" ../runtime/tools/efm_perl.pl >/usr/local/Cellar/vim/HEAD/share/vim/vim73/tools/efm_perl.pl
sed: RE error: illegal byte sequence
make[1]: *** [installtools] Error 1
make[1]: *** Waiting for unfinished jobs....
Fix: sed: RE error: illegal byte sequence
This commit fix the problem with:

```sh
chmod 644 /usr/local/Cellar/vim/HEAD/share/vim/vim73/tools/*
perlpath=`./which.sh perl` && sed -e "s+/usr/bin/perl+$perlpath+" ../runtime/tools/efm_perl.pl >/usr/local/Cellar/vim/HEAD/share/vim/vim73/tools/efm_perl.pl
sed: RE error: illegal byte sequence
make[1]: *** [installtools] Error 1
make[1]: *** Waiting for unfinished jobs....
```
@jacknagel

This comment has been minimized.

Copy link
Contributor

jacknagel commented Apr 23, 2012

What is your brew --config and the output of locale?

@DAddYE

This comment has been minimized.

Copy link

DAddYE commented Apr 23, 2012

Yea:

HOMEBREW_VERSION: 0.9
HEAD: 768e5a31c54fbd59450b3135a10324f63eb4e2a2
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: dual-core 64-bit penryn
OS X: 10.8
Kernel Architecture: x86_64
Xcode: 4.4
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 4.0 build 421
MacPorts or Fink? false
X11: /usr/X11 => /opt/X11
System Ruby: 1.8.7-358
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl:   /usr/bin/perl
Which Python: /usr/bin/python
Which Ruby:   /Users/DAddYE/.rbenv/shims/ruby
$ locale
locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
@jacknagel

This comment has been minimized.

Copy link
Contributor

jacknagel commented May 3, 2012

Related: https://groups.google.com/forum/?fromgroups#!topic/vim_dev/Bb6PAdwOpTc

There seems to be something up with Mountain Lion's sed; other sed implementations handle it fine. A similar bug report in mxcl/homebrew ended with the reporter filing a radar with Apple.

In the meantime, given the Mountain Lion is pre-release I don't want to start adding workarounds for it just yet.

@jacknagel jacknagel closed this May 3, 2012

@dceddia

This comment has been minimized.

Copy link

dceddia commented May 25, 2012

I had this same error installing libmagic, and fixed it with a very similar addition to the brew script. I'm running Mountain Lion as well. If anyone else needs this fix:

brew edit libmagic

Insert this line right before system make:

system "iconv -c -t UTF-8 ./doc/libmagic.man > ./doc/libmagic.man"
@wreimers

This comment has been minimized.

Copy link

wreimers commented Jun 27, 2012

This seems to be a result of stricter regex parsing in Mountain Lion. A quick fix is to unset your LANG environment variable an re-run the brew command.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jul 26, 2012

FYI this happens in 10.8.0 and seems to affect a lot of stuff :(

@wreimers

This comment has been minimized.

Copy link

wreimers commented Jul 26, 2012

Yup - just unset your LANG env var and all should be well.

@anthonysutardja

This comment has been minimized.

Copy link

anthonysutardja commented Jul 27, 2012

How do I do that?

EDIT: Figured it out. unset LANG

@dceddia

This comment has been minimized.

Copy link

dceddia commented Jul 27, 2012

Yep you got it. Also, you can put that line in your ~/.bash_profile file and it'll execute every time you open a new Terminal window.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jul 27, 2012

I wouldn't advise doing that; it may break other things.

@dceddia

This comment has been minimized.

Copy link

dceddia commented Jul 27, 2012

Hm, probably right. How about something like alias brew='unset LANG brew'?

@pencilcheck

This comment has been minimized.

Copy link

pencilcheck commented Jul 29, 2012

unset LANG doesn't work

@sethfowler

This comment has been minimized.

Copy link

sethfowler commented Jul 30, 2012

Indeed; unset LANG worked for me on a clean Mountain Lion install but not on a machine where Mountain Lion had been upgraded from Lion. I don't have the other machine to compare against here, so I'm not sure of the root cause, but the symptom was that on the upgraded machine I got this output from locale after running unset LANG:

LANG=
LC_COLLATE="C"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

As you can see, LC_CTYPE still specified a UTF-8 locale. After running export LC_CTYPE="C", I was able to successfully install vim.

@pencilcheck

This comment has been minimized.

Copy link

pencilcheck commented Jul 31, 2012

Thanks, that did solve the problem.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jul 31, 2012

We'll talk about this in Homebrew/legacy-homebrew#13787

@GuyCheung

This comment has been minimized.

Copy link

GuyCheung commented Jan 24, 2013

I unset the LANG on 10.8.2,pass~

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.