Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fix "sed: illegal option -- r" in macOS Sierra Android build?

I am trying to build Android on my MacOS, but it gives me this error:

"sed: illegal option -- r"

I tried:

make bootimage
make systemimage
make recovery
brunch
mka bacon

All of them give me the same error.

like image 858
flo071 Avatar asked Apr 29 '17 13:04

flo071


2 Answers

Another option is to use homebrew to install gnu-sed:

brew install gnu-sed --with-default-names
like image 102
Nathan Williams Avatar answered Oct 11 '22 13:10

Nathan Williams


Editing PATH manually is one way. However, this is an alternative solution that might work for some.

Most of the developers these days have conda. conda can install the latest sed and make it visible via $PATH

conda install -c conda-forge sed

conda takes care of editing PATH variable

P.S. Most believe conda is a package manager for python, but that is not entirely true. I install everything using conda. And it manages environment variables such as PATH really well. https://superuser.com/a/1304148/266871

like image 40
Thamme Gowda Avatar answered Oct 11 '22 12:10

Thamme Gowda