How do I fix “sed: illegal option — r” in MacOS Sierra Android build?

和自甴很熟 提交于 2019-12-04 21:51:05

问题


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.


回答1:


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

brew install gnu-sed --with-default-names



回答2:


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



来源:https://stackoverflow.com/questions/43696304/how-do-i-fix-sed-illegal-option-r-in-macos-sierra-android-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!