/bin/bash: [xxxx]: command not found

/********************************************************************************
 *                   /bin/bash: [xxxx]: command not found
 * 说明:
 *     本文主要是记录android编译过程中遇到的编译错误。
 *
 *                                              2016-5-21 深圳 南山平山村 曾剑锋
 *******************************************************************************/

一、参考文章:
    1. Ubuntu搭建android编译环境总结
        http://blog.csdn.net/nxh_love/article/details/8834849

二、错误现象:
    1. error1:
        1. 错误现象:
            ......
            sses-jarjar.jar
            Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar
            Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/noproguard.classes.jar
            target Dex: ext
            Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/noproguard.classes.dex
            target Jar: ext (out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/javalib.jar)
             'out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.dex' as 'classes.dex'...
            Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y
            bison -d  -o out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y
            /bin/bash: bison: command not found
            make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 127
        2. 解决方法:
            zengjf@zengjf:~/myandroid$ sudo apt-get install bison
    2. error2:
        1. 错误现象:
            ......
            host C++: aidl <= frameworks/base/tools/aidl/generate_java_binder.cpp
            host C++: aidl <= frameworks/base/tools/aidl/generate_java_rpc.cpp
            host C++: aidl <= out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp
            out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp: In function 'int yyparse()':
            out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:1948:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
            out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp:2090:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
            Lex: aidl <= frameworks/base/tools/aidl/aidl_language_l.l
            /bin/bash: flex: command not found
            make: *** [out/host/linux-x86/obj/EXECUTABLES/aidl_intermediates/aidl_language_l.cpp] Error 127
        2. 解决方法:
            zengjf@zengjf:~/myandroid$ sudo apt-get install flex

 

posted on 2016-05-21 18:01  zengjf  阅读(1359)  评论(0编辑  收藏  举报

导航